Skip to content

Commit

Permalink
fs/9p: Fix revalidate to return correct value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kvaneesh authored and ericvh committed Apr 15, 2011
1 parent 5853b4f commit f2eda2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/9p/vfs_dentry.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f2eda2c

Please sign in to comment.