[Bugs] [Bug 1240916] New: glfs_loc_link: Update loc.inode with the existing inode incase if already exits

bugzilla at redhat.com bugzilla at redhat.com
Wed Jul 8 06:35:44 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1240916

            Bug ID: 1240916
           Summary: glfs_loc_link: Update loc.inode with the existing
                    inode incase if already exits
           Product: GlusterFS
           Version: mainline
         Component: libgfapi
          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



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

-- 
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