OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'aosp/android-4.4' into kernel-4.4
[android-x86/kernel.git]
/
fs
/
xfs
/
xfs_bmap_util.c
diff --git
a/fs/xfs/xfs_bmap_util.c
b/fs/xfs/xfs_bmap_util.c
index
dbae649
..
832764e
100644
(file)
--- a/
fs/xfs/xfs_bmap_util.c
+++ b/
fs/xfs/xfs_bmap_util.c
@@
-1713,6
+1713,7
@@
xfs_swap_extents(
xfs_trans_t *tp;
xfs_bstat_t *sbp = &sxp->sx_stat;
xfs_ifork_t *tempifp, *ifp, *tifp;
xfs_trans_t *tp;
xfs_bstat_t *sbp = &sxp->sx_stat;
xfs_ifork_t *tempifp, *ifp, *tifp;
+ xfs_extnum_t nextents;
int src_log_flags, target_log_flags;
int error = 0;
int aforkblks = 0;
int src_log_flags, target_log_flags;
int error = 0;
int aforkblks = 0;
@@
-1899,7
+1900,8
@@
xfs_swap_extents(
* pointer. Otherwise it's already NULL or
* pointing to the extent.
*/
* pointer. Otherwise it's already NULL or
* pointing to the extent.
*/
- if (ip->i_d.di_nextents <= XFS_INLINE_EXTS) {
+ nextents = ip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
+ if (nextents <= XFS_INLINE_EXTS) {
ifp->if_u1.if_extents =
ifp->if_u2.if_inline_ext;
}
ifp->if_u1.if_extents =
ifp->if_u2.if_inline_ext;
}
@@
-1918,7
+1920,8
@@
xfs_swap_extents(
* pointer. Otherwise it's already NULL or
* pointing to the extent.
*/
* pointer. Otherwise it's already NULL or
* pointing to the extent.
*/
- if (tip->i_d.di_nextents <= XFS_INLINE_EXTS) {
+ nextents = tip->i_df.if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
+ if (nextents <= XFS_INLINE_EXTS) {
tifp->if_u1.if_extents =
tifp->if_u2.if_inline_ext;
}
tifp->if_u1.if_extents =
tifp->if_u2.if_inline_ext;
}