Skip to content

Commit

Permalink
fh_to_dentry should return ESTALE when generation mismatch
Browse files Browse the repository at this point in the history
When generation mismatch, it usually means the file pointed by the file handle
was deleted. We should return ESTALE to indicate this. We return ENOENT in
zfs_vget since zpl_fh_to_dentry will convert it to ESTALE.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4828
  • Loading branch information
Chunwei Chen authored and behlendorf committed Jul 12, 2016
1 parent d470101 commit 6c25306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/zfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp)
fid_gen);
iput(ZTOI(zp));
ZFS_EXIT(zsb);
return (SET_ERROR(EINVAL));
return (SET_ERROR(ENOENT));
}

*ipp = ZTOI(zp);
Expand Down

0 comments on commit 6c25306

Please sign in to comment.