#include "xfs_quota.h"
#include "xfs_trace.h"
#include "xfs_dir2.h"
+#include "xfs_defer.h"
/*
* Look at all the extents for this logical region,
{
struct xfs_trans *trans;
struct xfs_mount *mp;
+ struct xfs_defer_ops dfops;
int lock_mode = XFS_ILOCK_SHARED;
int error = 0;
error = xfs_trans_alloc(mp, &M_RES(mp)->tr_attrinval, 0, 0, 0, &trans);
if (error)
goto out_destroy_fork;
+ xfs_defer_init(trans, &dfops);
lock_mode = XFS_ILOCK_EXCL;
xfs_ilock(dp, lock_mode);
int nimaps;
struct xfs_bmbt_irec imap;
struct xfs_mount *mp = ip->i_mount;
+ struct xfs_defer_ops dfops;
/*
* Figure out if there are any blocks beyond the end
ASSERT(XFS_FORCED_SHUTDOWN(mp));
return error;
}
+ xfs_defer_init(tp, &dfops);
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, 0);
{
struct xfs_mount *mp = ip->i_mount;
struct xfs_trans *tp = *tpp;
- struct xfs_defer_ops *odfops = tp->t_dfops;
- struct xfs_defer_ops dfops;
xfs_fileoff_t first_unmap_block;
xfs_fileoff_t last_block;
xfs_filblks_t unmap_len;
ASSERT(first_unmap_block < last_block);
unmap_len = last_block - first_unmap_block + 1;
while (!done) {
- xfs_defer_init(tp, &dfops);
+ ASSERT(tp->t_firstblock == NULLFSBLOCK);
error = xfs_bunmapi(tp, ip, first_unmap_block, unmap_len, flags,
XFS_ITRUNC_MAX_EXTENTS, &done);
if (error)
trace_xfs_itruncate_extents_end(ip, new_size);
out:
- /* ->t_dfops points to local stack, don't leak it! */
- tp->t_dfops = odfops;
*tpp = tp;
return error;
out_bmap_cancel:
{
struct xfs_mount *mp = ip->i_mount;
struct xfs_trans *tp;
+ struct xfs_defer_ops dfops;
int error;
error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp);
ASSERT(XFS_FORCED_SHUTDOWN(mp));
return error;
}
+ xfs_defer_init(tp, &dfops);
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, 0);
#include "xfs_dir2.h"
#include "xfs_trans_space.h"
#include "xfs_iomap.h"
+#include "xfs_defer.h"
#include <linux/capability.h>
#include <linux/xattr.h>
struct inode *inode = VFS_I(ip);
xfs_off_t oldsize, newsize;
struct xfs_trans *tp;
+ struct xfs_defer_ops dfops;
int error;
uint lock_flags = 0;
bool did_zeroing = false;
error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp);
if (error)
return error;
+ xfs_defer_init(tp, &dfops);
lock_flags |= XFS_ILOCK_EXCL;
xfs_ilock(ip, XFS_ILOCK_EXCL);
#include "xfs_qm.h"
#include "xfs_trace.h"
#include "xfs_icache.h"
+#include "xfs_defer.h"
STATIC int xfs_qm_log_quotaoff(xfs_mount_t *, xfs_qoff_logitem_t **, uint);
STATIC int xfs_qm_log_quotaoff_end(xfs_mount_t *, xfs_qoff_logitem_t *,
{
struct xfs_inode *ip;
struct xfs_trans *tp;
+ struct xfs_defer_ops dfops;
int error;
if (ino == NULLFSINO)
xfs_iunlock(ip, XFS_IOLOCK_EXCL);
goto out_put;
}
+ xfs_defer_init(tp, &dfops);
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, 0);