]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix ext4_swap_extents() error handling
authorTheodore Ts'o <tytso@mit.edu>
Sun, 31 Aug 2014 19:03:14 +0000 (15:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 31 Aug 2014 19:03:14 +0000 (15:03 -0400)
commit13fc4a254673a236e98e249f8b5afa215e2672e4
tree3c3a3cc20bf26de88d97062ccc5d6cdf0e26bacd
parent379c8393911ed1d291f1a97b5a317e192783b4dd
ext4: fix ext4_swap_extents() error handling

If ext4_ext_find_extent() returns an error, we have to clear path1 or
path2 or else we would end up trying to free an ERR_PTR, which would
be bad.

Also eliminate some redundant code and mark the error paths as unlikely()

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