]> git.karo-electronics.de Git - linux-beck.git/commit
ext4: remove unneeded test in ext4_alloc_file_blocks()
authorFabian Frederick <fabf@skynet.be>
Thu, 15 Sep 2016 15:52:07 +0000 (11:52 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 15 Sep 2016 15:52:07 +0000 (11:52 -0400)
commitc3fe493ccdb1f443c30155150391835004014c6a
tree2e8c0dc7f294a7810abf0e8b27d0765573d774c9
parentedf15aa180d7b98fe16bd3eda42f9dd0e60dee20
ext4: remove unneeded test in ext4_alloc_file_blocks()

ext4_alloc_file_blocks() is called from ext4_zero_range() and
ext4_fallocate() both already testing EXT4_INODE_EXTENTS
We can call ext_depth(inode) unconditionnally.

[ Added BUG_ON check to make sure ext4_alloc_file_blocks() won't get
  called for a indirect-mapped inode in the future.  -- tytso ]

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c