mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 22:25:16 +00:00
vfs: ftruncate check IS_APPEND() on real upper inode
ftruncate an overlayfs inode was checking IS_APPEND() on overlay inode, but overlay inode does not have the S_APPEND flag. Check IS_APPEND() on real upper inode instead. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
33006cdf9c
commit
78757af651
1 changed files with 2 additions and 1 deletions
|
@ -193,7 +193,8 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
|
|||
goto out_putf;
|
||||
|
||||
error = -EPERM;
|
||||
if (IS_APPEND(inode))
|
||||
/* Check IS_APPEND on real upper inode */
|
||||
if (IS_APPEND(file_inode(f.file)))
|
||||
goto out_putf;
|
||||
|
||||
sb_start_write(inode->i_sb);
|
||||
|
|
Loading…
Add table
Reference in a new issue