mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-30 11:08:30 +00:00
f2fs: don't allow atomic writes for not regular files
The atomic writes only supports regular files for database. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
8c242db9b8
commit
e811898c97
1 changed files with 3 additions and 0 deletions
|
@ -1518,6 +1518,9 @@ static int f2fs_ioc_start_atomic_write(struct file *filp)
|
|||
if (!inode_owner_or_capable(inode))
|
||||
return -EACCES;
|
||||
|
||||
if (!S_ISREG(inode->i_mode))
|
||||
return -EINVAL;
|
||||
|
||||
ret = mnt_want_write_file(filp);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue