diff options
author | Lukas Czerner <lczerner@redhat.com> | 2014-04-12 10:05:37 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-04-12 10:05:37 -0400 |
commit | 0790b31b69374ddadefebb156251b319e5b43345 (patch) | |
tree | ac6daf0dc694e27eaf143cd619459156c4ea477f /fs/ext4/extents.c | |
parent | 23fffa925ea2c9a2bcb1a4453e2c542635aa3545 (diff) | |
download | linux-0790b31b69374ddadefebb156251b319e5b43345.tar.gz linux-0790b31b69374ddadefebb156251b319e5b43345.tar.bz2 linux-0790b31b69374ddadefebb156251b319e5b43345.zip |
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/extents.c')
-rw-r--r-- | fs/ext4/extents.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index ac5460d0d133..b2d3869b5762 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5405,11 +5405,6 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) goto out_mutex; } - if (IS_SWAPFILE(inode)) { - ret = -ETXTBSY; - goto out_mutex; - } - /* Currently just for extent based files */ if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) { ret = -EOPNOTSUPP; |