linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4]ext4: Return exchanged blocks count to user space in failure
@ 2009-09-02  3:18 Akira Fujita
  2009-09-02 15:54 ` Peng Tao
  2009-09-06  3:13 ` Theodore Tso
  0 siblings, 2 replies; 16+ messages in thread
From: Akira Fujita @ 2009-09-02  3:18 UTC (permalink / raw)
  To: Theodore Tso; +Cc: linux-ext4

ext4: Return exchanged blocks count to user space in failure

From: Akira Fujita <a-fujita@rs.jp.nec.com>

Return exchanged blocks count (moved_len) to user space,
if ext4_move_extents() failed on the way.

Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
---
 fs/ext4/ioctl.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index b0b434b..efd11c8 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -255,10 +255,9 @@ setversion_out:
 					me.donor_start, me.len, &me.moved_len);
 		fput(donor_filp);

-		if (!err)
-			if (copy_to_user((struct move_extent *)arg,
-				&me, sizeof(me)))
-				return -EFAULT;
+		if (copy_to_user((struct move_extent *)arg, &me, sizeof(me)))
+			return -EFAULT;
+
 		return err;
 	}

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-09-14  6:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02  3:18 [PATCH 3/4]ext4: Return exchanged blocks count to user space in failure Akira Fujita
2009-09-02 15:54 ` Peng Tao
2009-09-02 20:59   ` Greg Freemyer
2009-09-03  5:13     ` Peng Tao
2009-09-03 13:48       ` Greg Freemyer
2009-09-04  3:35         ` Peng Tao
2009-09-04  9:55       ` Akira Fujita
2009-09-04 16:43         ` Peng Tao
2009-09-08  4:11           ` Akira Fujita
2009-09-08  8:00             ` Peng Tao
2009-09-11  5:06               ` Akira Fujita
2009-09-11  5:28                 ` Peng Tao
2009-09-11 16:57                 ` Peng Tao
2009-09-14  6:16                   ` Akira Fujita
2009-09-06  3:37         ` Theodore Tso
2009-09-06  3:13 ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).