diff options
author | Lukas Czerner <lczerner@redhat.com> | 2014-04-12 16:05:37 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-04-12 16:05:37 +0200 |
commit | 0790b31b69374ddadefebb156251b319e5b43345 (patch) | |
tree | ac6daf0dc694e27eaf143cd619459156c4ea477f /fs/ceph | |
parent | fs: move falloc collapse range check into the filesystem methods (diff) | |
download | linux-0790b31b69374ddadefebb156251b319e5b43345.tar.xz 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/ceph')
-rw-r--r-- | fs/ceph/file.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 09c7afe32e49..596e6cc9f9c4 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -1215,9 +1215,6 @@ static long ceph_fallocate(struct file *file, int mode, if (!S_ISREG(inode->i_mode)) return -EOPNOTSUPP; - if (IS_SWAPFILE(inode)) - return -ETXTBSY; - mutex_lock(&inode->i_mutex); if (ceph_snap(inode) != CEPH_NOSNAP) { |