]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix error handling in ocfs2_ioctl_move_extents()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 29 Apr 2013 22:05:58 +0000 (15:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Apr 2013 22:54:27 +0000 (15:54 -0700)
commitb1e7df1619913692fc1b009d306e156adc329c7c
tree9a02a047442e396a163e4014467258222d696ccd
parent58022324d2c341df25b0852bb9ab7642d89fa8f9
ocfs2: fix error handling in ocfs2_ioctl_move_extents()

Smatch complains that if we hit an error (for example if the file is
immutable) then "range" has uninitialized stack data and we copy it to
the user.

I've re-written the error handling to avoid this problem and make it a
little cleaner as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/move_extents.c