lkml.org 
[lkml]   [2016]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
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
\
 
 \ /
  Last update: 2016-04-15 18:01    [W:0.276 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site