提交 6d2b6170 编写于 作者: E Eric Biggers 提交者: Al Viro

vfs: fix check for fallocate on active swapfile

Fix the broken check for calling sys_fallocate() on an active swapfile,
introduced by commit 0790b31b ("fs: disallow all fallocate
operation on active swapfile").
Signed-off-by: NEric Biggers <ebiggers3@gmail.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 af436472
......@@ -263,11 +263,10 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
return -EPERM;
/*
* We can not allow to do any fallocate operation on an active
* swapfile
* We cannot allow any fallocate operation on an active swapfile
*/
if (IS_SWAPFILE(inode))
ret = -ETXTBSY;
return -ETXTBSY;
/*
* Revalidate the write permissions, in case security policy has
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册