hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/fs/xfs/xfs_bmap_util.c
....@@ -800,9 +800,6 @@
800800 quota_flag = XFS_QMOPT_RES_REGBLKS;
801801 }
802802
803
- /*
804
- * Allocate and setup the transaction.
805
- */
806803 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, resblks,
807804 resrtextents, 0, &tp);
808805
....@@ -830,9 +827,9 @@
830827 if (error)
831828 goto error0;
832829
833
- /*
834
- * Complete the transaction
835
- */
830
+ ip->i_d.di_flags |= XFS_DIFLAG_PREALLOC;
831
+ xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
832
+
836833 error = xfs_trans_commit(tp);
837834 xfs_iunlock(ip, XFS_ILOCK_EXCL);
838835 if (error)