Lower files may be shared in overlayfs so strictly checking write perssmion on lower file will cause interferes between different overlayfs instances. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx> --- fs/overlayfs/inode.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 28c71978eb2e..17d1add0af1a 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c @@ -31,12 +31,6 @@ int ovl_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, goto out; if (attr->ia_valid & ATTR_SIZE) { - struct inode *realinode = d_inode(ovl_dentry_real(dentry)); - - err = -ETXTBSY; - if (atomic_read(&realinode->i_writecount) < 0) - goto out_drop_write; - /* Truncate should trigger data copy up as well */ full_copy_up = true; } -- 2.27.0