diff options
author | Jie Liu <jeff.liu@oracle.com> | 2013-08-12 14:49:59 +0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-13 02:47:34 +0400 |
commit | 3d3c8b5222b92447bffaa4127ee18c757f32a460 (patch) | |
tree | 250f3b61679231944b5272d18d17e6ceabfc62d1 /fs/xfs/xfs_ioctl.c | |
parent | 783cb6d172358892d6af394ebe2876bcbfcc6499 (diff) | |
download | linux-3d3c8b5222b92447bffaa4127ee18c757f32a460.tar.xz |
xfs: refactor xfs_trans_reserve() interface
With the new xfs_trans_res structure has been introduced, the log
reservation size, log count as well as log flags are pre-initialized
at mount time. So it's time to refine xfs_trans_reserve() interface
to be more neat.
Also, introduce a new helper M_RES() to return a pointer to the
mp->m_resv structure to simplify the input.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index efb216de5f69..e9c17e2ed6d7 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -367,7 +367,7 @@ xfs_set_dmattrs( return XFS_ERROR(EIO); tp = xfs_trans_alloc(mp, XFS_TRANS_SET_DMATTRS); - error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES (mp), 0, 0, 0); + error = xfs_trans_reserve(tp, &M_RES(mp)->tr_ichange, 0, 0); if (error) { xfs_trans_cancel(tp, 0); return error; @@ -1001,7 +1001,7 @@ xfs_ioctl_setattr( * first do an error checking pass. */ tp = xfs_trans_alloc(mp, XFS_TRANS_SETATTR_NOT_SIZE); - code = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0); + code = xfs_trans_reserve(tp, &M_RES(mp)->tr_ichange, 0, 0); if (code) goto error_return; |