Skip to content

Commit

Permalink
ocfs2: fix error return code in ocfs2_info_handle_freefrag()
Browse files Browse the repository at this point in the history
Fix to return a negative error code from the error handling case instead
of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Mark Fasheh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Wei Yongjun authored and torvalds committed Apr 29, 2013
1 parent b3e0767 commit 7ebab45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ocfs2/ioctl.c
Original file line number Diff line number Diff line change
@@ -706,8 +706,10 @@ int ocfs2_info_handle_freefrag(struct inode *inode,

o2info_set_request_filled(&oiff->iff_req);

if (o2info_to_user(*oiff, req))
if (o2info_to_user(*oiff, req)) {
status = -EFAULT;
goto bail;
}

status = 0;
bail:

0 comments on commit 7ebab45

Please sign in to comment.