summaryrefslogtreecommitdiff
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2014-04-12 18:05:37 +0400
committerTheodore Ts'o <tytso@mit.edu>2014-04-12 18:05:37 +0400
commit0790b31b69374ddadefebb156251b319e5b43345 (patch)
treeac6daf0dc694e27eaf143cd619459156c4ea477f /fs/ext4/inode.c
parent23fffa925ea2c9a2bcb1a4453e2c542635aa3545 (diff)
downloadlinux-0790b31b69374ddadefebb156251b319e5b43345.tar.xz
fs: disallow all fallocate operation on active swapfile
Currently some file system have IS_SWAPFILE check in their fallocate implementations and some do not. However we should really prevent any fallocate operation on swapfile so move the check to vfs and remove the redundant checks from the file systems fallocate implementations. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e2bba76f0d7b..b74cfd2a42ec 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3542,11 +3542,6 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
mutex_lock(&inode->i_mutex);
- if (IS_SWAPFILE(inode)) {
- ret = -ETXTBSY;
- goto out_mutex;
- }
-
/* No need to punch hole beyond i_size */
if (offset >= inode->i_size)
goto out_mutex;