From: Zheng Liu <hidden> Date: 2012-11-20 09:17:14
Hi all,
This patch series tries to remove a sanity check in fallocate from specific
filesystems because vfs has already checked it.
I am not very familiar with why we need to do this duplicated check. Please let
me know if I miss something.
Regards,
- Zheng
---
Zheng Liu(4):
ext4: remove dupoicated check from ext4_fallocate
xfs: remove duplicated check from xfs_file_fallocate
btrfs: remove duplicated check from btrfs_fallocate
ocfs2: remove duplicated check from ocfs2_fallocate
fs/btrfs/file.c | 4 ----
fs/ext4/extents.c | 4 ----
fs/ocfs2/file.c | 2 --
fs/xfs/xfs_file.c | 3 ---
4 files changed, 13 deletions(-)
From: Zheng Liu <hidden> Date: 2012-11-20 09:17:22
From: Zheng Liu <redacted>
Remove a sanity check from btrfs_fallocate because vfs has already checked it.
Reported-by: Guo Chao <redacted>
Signed-off-by: Zheng Liu <redacted>
---
fs/btrfs/file.c | 4 ----
1 file changed, 4 deletions(-)
@@ -1999,10 +1999,6 @@ static long btrfs_fallocate(struct file *file, int mode,alloc_start=offset&~mask;alloc_end=(offset+len+mask)&~mask;-/* Make sure we aren't being give some crap mode */-if(mode&~(FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE))-return-EOPNOTSUPP;-if(mode&FALLOC_FL_PUNCH_HOLE)returnbtrfs_punch_hole(inode,offset,len);
From: Zheng Liu <hidden> Date: 2012-11-20 09:17:25
From: Zheng Liu <redacted>
Remove a sanity check from ocfs2_fallocate because vfs has already checked it.
Reported-by: Guo Chao <redacted>
Signed-off-by: Zheng Liu <redacted>
---
fs/ocfs2/file.c | 2 --
1 file changed, 2 deletions(-)
From: Zheng Liu <hidden> Date: 2012-11-20 09:29:42
From: Zheng Liu <redacted>
Remove a sanity check from ext4_fallocate because vfs has already checked it.
Reported-by: Guo Chao <redacted>
Signed-off-by: Zheng Liu <redacted>
---
fs/ext4/extents.c | 4 ----
1 file changed, 4 deletions(-)
@@ -4427,10 +4427,6 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)if(!(ext4_test_inode_flag(inode,EXT4_INODE_EXTENTS)))return-EOPNOTSUPP;-/* Return error if mode is not supported */-if(mode&~(FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE))-return-EOPNOTSUPP;-if(mode&FALLOC_FL_PUNCH_HOLE)returnext4_punch_hole(file,offset,len);
From: Zheng Liu <hidden> Date: 2012-11-20 09:29:43
From: Zheng Liu <redacted>
Remove a sanity check from xfs_file_fallocate because vfs has already checked
it.
Reported-by: Guo Chao <redacted>
Signed-off-by: Zheng Liu <redacted>
---
fs/xfs/xfs_file.c | 3 ---
1 file changed, 3 deletions(-)
From: Christoph Hellwig <hch@infradead.org> Date: 2012-11-20 10:14:53
On Tue, Nov 20, 2012 at 05:29:41PM +0800, Zheng Liu wrote:
Hi all,
This patch series tries to remove a sanity check in fallocate from specific
filesystems because vfs has already checked it.
I am not very familiar with why we need to do this duplicated check. Please let
me know if I miss something.
Each filesystem driver checks to see if a flag that it doesn't support
gets passed down. This was done with the intention that we can add new
flags to the VFS without having to update every filesystem.
From: Zheng Liu <hidden> Date: 2012-11-20 10:46:46
On Tue, Nov 20, 2012 at 05:14:53AM -0500, Christoph Hellwig wrote:
On Tue, Nov 20, 2012 at 05:29:41PM +0800, Zheng Liu wrote:
quoted
Hi all,
This patch series tries to remove a sanity check in fallocate from specific
filesystems because vfs has already checked it.
I am not very familiar with why we need to do this duplicated check. Please let
me know if I miss something.
Each filesystem driver checks to see if a flag that it doesn't support
gets passed down. This was done with the intention that we can add new
flags to the VFS without having to update every filesystem.