]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
fs/9p: Fix revalidate to return correct value
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 23 Mar 2011 14:18:16 +0000 (19:48 +0530)
committerEric Van Hensbergen <ericvh@gmail.com>
Fri, 15 Apr 2011 20:26:13 +0000 (15:26 -0500)
revalidate should return > 0 on success. Also return 0 on ENOENT
to force do_revalidate to return NULL dentry;

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
fs/9p/vfs_dentry.c

index b6a3b9f7fe4d85c428ce6ccacf3d84826075d24c..e022890c6f403283b4da166b7c56e4a27e14b975 100644 (file)
@@ -126,7 +126,9 @@ static int v9fs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
                        retval = v9fs_refresh_inode_dotl(fid, inode);
                else
                        retval = v9fs_refresh_inode(fid, inode);
-               if (retval <= 0)
+               if (retval == -ENOENT)
+                       return 0;
+               if (retval < 0)
                        return retval;
        }
 out_valid: