summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/overlayfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index f7caf16f9bec..76cfe9d04e64 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -137,7 +137,7 @@ int ovl_permission(struct inode *inode, int mask)
return err;
old_cred = ovl_override_creds(inode->i_sb);
- if (!is_upper)
+ if (!is_upper && !special_file(realinode->i_mode))
mask &= ~(MAY_WRITE | MAY_APPEND);
err = inode_permission(realinode, mask);
revert_creds(old_cred);