]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ext4: remove unnecessary check for APPEND and IMMUTABLE
authorLukas Czerner <lczerner@redhat.com>
Sat, 12 Apr 2014 13:47:00 +0000 (09:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 Apr 2014 13:47:00 +0000 (09:47 -0400)
All the checks IS_APPEND and IS_IMMUTABLE for the fallocate operation on
the inode are done in vfs. No need to do this again in ext4. Remove it.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/inode.c

index be1e56cbbf323d7c10c8ca7979c9dd014a4a3123..ed4ec48239b6b3672755d68079fa8131ec51acec 100644 (file)
@@ -5398,12 +5398,6 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
        /* Take mutex lock */
        mutex_lock(&inode->i_mutex);
 
-       /* It's not possible punch hole on append only file */
-       if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) {
-               ret = -EPERM;
-               goto out_mutex;
-       }
-
        if (IS_SWAPFILE(inode)) {
                ret = -ETXTBSY;
                goto out_mutex;
index f023f0cb46fc227ebf1f62f1ee8b6ffb5b8204e7..e2bba76f0d7bea6e0ca2b8e877b0593b10ace97a 100644 (file)
@@ -3541,11 +3541,7 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
        }
 
        mutex_lock(&inode->i_mutex);
-       /* It's not possible punch hole on append only file */
-       if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) {
-               ret = -EPERM;
-               goto out_mutex;
-       }
+
        if (IS_SWAPFILE(inode)) {
                ret = -ETXTBSY;
                goto out_mutex;