diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 16:44:41 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 16:44:41 +0300 |
commit | 46e5d0a3907ba489fda4f7b043439a3599184f91 (patch) | |
tree | b608f23dd8efad63c62e023804cc6331ba2ee172 /fs/overlayfs/overlayfs.h | |
parent | 5812160eb50925d19c54be979c72d335fee17dbd (diff) | |
download | linux-46e5d0a3907ba489fda4f7b043439a3599184f91.tar.xz |
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/overlayfs.h')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 25cf26e57cdb..f28f1e37d457 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -9,6 +9,7 @@ #include <linux/kernel.h> #include <linux/uuid.h> +#include <linux/fs.h> #include "ovl_entry.h" enum ovl_path_type { @@ -348,6 +349,7 @@ static inline void ovl_copyattr(struct inode *from, struct inode *to) to->i_atime = from->i_atime; to->i_mtime = from->i_mtime; to->i_ctime = from->i_ctime; + i_size_write(to, i_size_read(from)); } static inline void ovl_copyflags(struct inode *from, struct inode *to) |