diff options
author | Chunwei Chen <[email protected]> | 2016-05-19 17:04:27 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-23 11:06:56 -0700 |
commit | cbecb4fb228bbfedec02eb0a172c681b4338d08f (patch) | |
tree | d30be82f37c58b7d863582b5c117a2216e89f3d1 /module/zfs/zfs_znode.c | |
parent | de0ef912ecea3d6c039760525c9195f174db7b93 (diff) |
Skip ctldir znode in zfs_rezget to fix snapdir issues
Skip ctldir in zfs_rezget, otherwise they will always get invalidated. This
will cause funny behaviour for the mounted snapdirs. Especially for
Linux >= 3.18, d_invalidate will detach the mountpoint and prevent anyone
automount it again as long as someone is still using the detached mount.
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4514
Closes #4661
Closes #4672
Diffstat (limited to 'module/zfs/zfs_znode.c')
-rw-r--r-- | module/zfs/zfs_znode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c index d9fcd2912..19cb414a9 100644 --- a/module/zfs/zfs_znode.c +++ b/module/zfs/zfs_znode.c @@ -1167,6 +1167,16 @@ zfs_rezget(znode_t *zp) uint64_t gen; znode_hold_t *zh; + /* + * skip ctldir, otherwise they will always get invalidated. This will + * cause funny behaviour for the mounted snapdirs. Especially for + * Linux >= 3.18, d_invalidate will detach the mountpoint and prevent + * anyone automount it again as long as someone is still using the + * detached mount. + */ + if (zp->z_is_ctldir) + return (0); + zh = zfs_znode_hold_enter(zsb, obj_num); mutex_enter(&zp->z_acl_lock); |