summaryrefslogtreecommitdiff
path: root/fs/locks.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
commit8cf9ee5061037accf61775f438ad7513576d4413 (patch)
tree6301abb5e6b1386103ea6c0dff437afd5f6ae6a8 /fs/locks.c
parent4ab30319fd7c691a1b3165325c647a5cd6d282ac (diff)
Revert "vfs: do get_write_access() on upper layer of overlayfs"
This reverts commit 4d0c5ba2ff79ef9f5188998b29fd28fcb05f3667. We now get write access on both overlay and underlying layers so this patch is no longer needed for correct operation. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c
index db7b6917d9c5..baa564841c03 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1654,8 +1654,7 @@ check_conflicting_open(const struct dentry *dentry, const long arg, int flags)
if (flags & FL_LAYOUT)
return 0;
- if ((arg == F_RDLCK) &&
- (atomic_read(&d_real_inode(dentry)->i_writecount) > 0))
+ if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
return -EAGAIN;
if ((arg == F_WRLCK) && ((d_count(dentry) > 1) ||