Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d2b6170 authored by Eric Biggers's avatar Eric Biggers Committed by Al Viro
Browse files

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: default avatarEric Biggers <ebiggers3@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent af436472
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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