[Bugs] [Bug 1241666] New: glfs_loc_link: Update loc.inode with the existing inode incase if already exits
bugzilla at redhat.com
bugzilla at redhat.com
Thu Jul 9 18:37:59 UTC 2015
https://bugzilla.redhat.com/show_bug.cgi?id=1241666
Bug ID: 1241666
Summary: glfs_loc_link: Update loc.inode with the existing
inode incase if already exits
Product: GlusterFS
Version: 3.7.2
Component: libgfapi
Keywords: Triaged
Severity: urgent
Assignee: bugs at gluster.org
Reporter: skoduri at redhat.com
QA Contact: sdharane at redhat.com
CC: bugs at gluster.org, gluster-bugs at redhat.com,
ndevos at redhat.com, sdharane at redhat.com,
srangana at redhat.com
Depends On: 1240916
Blocks: 1235121
+++ This bug was initially created as a clone of Bug #1240916 +++
Description of problem:
int
glfs_loc_link (loc_t *loc, struct iatt *iatt)
{
int ret = -1;
inode_t *linked_inode = NULL;
if (!loc->inode) {
errno = EINVAL;
return -1;
}
linked_inode = inode_link (loc->inode, loc->parent, loc->name, iatt);
if (linked_inode) {
inode_lookup (linked_inode);
inode_unref (linked_inode);
ret = 0;
} else {
ret = -1;
errno = ENOMEM;
}
return ret;
}
Here in case if the inode already exits in the cache, inode_link returns the
pointer to the exiting one instead of using loc->inode. This results in the
loc->inode not being updated which may result in the issues reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1235121#c10
--- Additional comment from Anand Avati on 2015-07-08 02:46:58 EDT ---
REVIEW: http://review.gluster.org/11572 (gfapi: Update loc->inode accordingly
in 'glfs_loc_link') posted (#1) for review on master by soumya k
(skoduri at redhat.com)
--- Additional comment from Anand Avati on 2015-07-09 14:04:41 EDT ---
COMMIT: http://review.gluster.org/11572 committed in master by Kaleb KEITHLEY
(kkeithle at redhat.com)
------
commit c134bdd83a781452eff8c3e4abce3da4a997daa8
Author: Soumya Koduri <skoduri at redhat.com>
Date: Wed Jul 8 12:08:25 2015 +0530
gfapi: Update loc->inode accordingly in 'glfs_loc_link'
In case if the inode already exits in the cache, inode_link
returns the pointer to the exiting one instead of using loc->inode.
This will result in issues if that invalid inodei(loc->inode) is referenced
further. Fixed the same.
Change-Id: I7d4a06043e4e731c8404532c47d482175dc2c277
BUG: 1240916
Signed-off-by: Soumya Koduri <skoduri at redhat.com>
Reviewed-on: http://review.gluster.org/11572
Tested-by: Gluster Build System <jenkins at build.gluster.com>
Tested-by: NetBSD Build System <jenkins at build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle at redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana at redhat.com>
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1235121
[Bug 1235121] nfs-ganesha: pynfs failures
https://bugzilla.redhat.com/show_bug.cgi?id=1240916
[Bug 1240916] glfs_loc_link: Update loc.inode with the existing inode
incase if already exits
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list