mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
Fix invalid fileid for snapshot root dentry
Prevents NFS client from detection of different fileids of snapshot root dentry before & after snapshot mount. Signed-off-by: Andrey Vesnovaty <andrey.vesnovaty@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
e20cd6f7a8
commit
aa9b27080b
@ -2415,6 +2415,16 @@ zfs_getattr_fast(struct inode *ip, struct kstat *sp)
|
||||
|
||||
mutex_exit(&zp->z_lock);
|
||||
|
||||
/*
|
||||
* Required to prevent NFS client from detecting different inode
|
||||
* numbers of snapshot root dentry before and after snapshot mount.
|
||||
*/
|
||||
if (zsb->z_issnap) {
|
||||
if (ip->i_sb->s_root->d_inode == ip)
|
||||
sp->ino = ZFSCTL_INO_SNAPDIRS -
|
||||
dmu_objset_id(zsb->z_os);
|
||||
}
|
||||
|
||||
ZFS_EXIT(zsb);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user