Re: [PATCH 2/3]ext4: Initialize moved_len before calling ext4_move_extents()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 18, 2009 at 04:26:10PM +0900, Akira Fujita wrote:
> ext4: initialize moved_len before calling ext4_move_extents()
> 
> From: Kazuya Mio <k-mio@xxxxxxxxxxxxx>
> 
> moved_len of struct move_extent is used to notify
> exchanged blocks count to the user space.
> So at the beginning of the EXT4_IOC_MOVE_EXT,
> moved_len should be always zero.
> Without this patch, if wrong moved_len is passed from the user space,
> EXT4_IOC_MOVE_EXT will return wrong blocks count.

Applied with the following rewording of the patch description:

ext4: initialize moved_len before calling ext4_move_extents()

From: Kazuya Mio <k-mio@xxxxxxxxxxxxx>

The move_extent.moved_len is used to pass back the number of exchanged
blocks count to user space.  Currently the caller must clear this
field; but we spend more code space checking for this requirement than
simply zeroing the field ourselves, so let's just make life easier for
everyone all around.

Signed-off-by: Kazuya Mio <k-mio@xxxxxxxxxxxxx>
Signed-off-by: Akira Fujita <a-fujita@xxxxxxxxxxxxx>
Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux