You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ext4: initialize moved_len before calling ext4_move_extents()
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@sx.jp.nec.com> Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
94d7c16cbb
commit
446aaa6e7e
@@ -239,6 +239,7 @@ setversion_out:
|
||||
}
|
||||
}
|
||||
|
||||
me.moved_len = 0;
|
||||
err = ext4_move_extents(filp, donor_filp, me.orig_start,
|
||||
me.donor_start, me.len, &me.moved_len);
|
||||
fput(donor_filp);
|
||||
|
||||
Reference in New Issue
Block a user