summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2018-07-18 15:44:43 +0200
committerMiklos Szeredi <mszeredi@redhat.com>2018-07-18 15:44:43 +0200
commitd561f218564855f69791216882a2622af37e5776 (patch)
tree3e1d9595071a54a46087f1b2c1a29153d49f6e99 /fs/namespace.c
parenta6518f73e60e5044656d1ba587e7463479a9381a (diff)
downloadlinux-d561f218564855f69791216882a2622af37e5776.tar.bz2
Revert "ovl: fix may_write_real() for overlayfs directories"
This reverts commit 954c736f865d6c0c68ae4263a2f3502ee7c447a3. Overlayfs no longer relies on the vfs for checking writability of files. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 8ddd14806799..76a742e36b32 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -468,9 +468,7 @@ static inline int may_write_real(struct file *file)
/* File refers to upper, writable layer? */
upperdentry = d_real(dentry, NULL, 0, D_REAL_UPPER);
- if (upperdentry &&
- (file_inode(file) == d_inode(upperdentry) ||
- file_inode(file) == d_inode(dentry)))
+ if (upperdentry && file_inode(file) == d_inode(upperdentry))
return 0;
/* Lower layer: can't write to real file, sorry... */