From: Wei Yongjun Date: Mon, 29 Apr 2013 22:05:57 +0000 (-0700) Subject: ocfs2: fix error return code in ocfs2_info_handle_freefrag() X-Git-Tag: upstream/snapshot3+hdmi~5281^2~130 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ebab4536958b05f65b71ec312073acf5d66578d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ocfs2: fix error return code in ocfs2_info_handle_freefrag() 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 Cc: Joel Becker Cc: Mark Fasheh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index 6cab301..0c60ef2 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c @@ -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: