diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 09:44:41 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 09:44:41 -0400 |
commit | 46e5d0a3907ba489fda4f7b043439a3599184f91 (patch) | |
tree | b608f23dd8efad63c62e023804cc6331ba2ee172 /fs/overlayfs/inode.c | |
parent | 5812160eb50925d19c54be979c72d335fee17dbd (diff) |
ovl: copy up file size as well
Copy i_size of the underlying inode to the overlay inode in ovl_copyattr().
This is in preparation for stacking I/O operations on overlay files.
This patch shouldn't have any observable effect.
Remove stale comment from ovl_setattr() [spotted by Vivek Goyal].
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/inode.c')
-rw-r--r-- | fs/overlayfs/inode.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 3f1e5bd0ba87..5b6c86703d34 100644 --- a/fs/overlayfs/inode.c +++ b/fs/overlayfs/inode.c | |||
@@ -22,15 +22,6 @@ int ovl_setattr(struct dentry *dentry, struct iattr *attr) | |||
22 | struct dentry *upperdentry; | 22 | struct dentry *upperdentry; |
23 | const struct cred *old_cred; | 23 | const struct cred *old_cred; |
24 | 24 | ||
25 | /* | ||
26 | * Check for permissions before trying to copy-up. This is redundant | ||
27 | * since it will be rechecked later by ->setattr() on upper dentry. But | ||
28 | * without this, copy-up can be triggered by just about anybody. | ||
29 | * | ||
30 | * We don't initialize inode->size, which just means that | ||
31 | * inode_newsize_ok() will always check against MAX_LFS_FILESIZE and not | ||
32 | * check for a swapfile (which this won't be anyway). | ||
33 | */ | ||
34 | err = setattr_prepare(dentry, attr); | 25 | err = setattr_prepare(dentry, attr); |
35 | if (err) | 26 | if (err) |
36 | return err; | 27 | return err; |