Messages in this thread Patch in this message | | | From | "Eric W. Biederman" <> | Date | Fri, 15 Apr 2016 10:35:21 -0500 | Subject | [PATCH 05/16] vfs: Allow unlink, and rename on expirable file mounts |
| |
This is motivated by /dev/ptmx now being an automount. Given that automounts eventually will go away I don't see that there is a point in making unlink and rename to wait until the automounts actually go away before allowing an operation.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> --- fs/namespace.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fs/namespace.c b/fs/namespace.c index 714778360c2b..278ecb7b8e8e 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -718,8 +718,14 @@ bool __is_local_mountpoint(struct dentry *dentry) down_read(&namespace_sem); list_for_each_entry(mnt, &ns->list, mnt_list) { is_covered = (mnt->mnt_mountpoint == dentry); - if (is_covered) + if (is_covered) { + if (!d_is_dir(dentry) && + (mnt->mnt.mnt_flags & MNT_SHRINKABLE)) { + is_covered = false; + continue; + } break; + } } up_read(&namespace_sem); out: -- 2.8.1
| |