From 33a6039007af112509f48910e62640dadd064322 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Fri, 6 Jun 2014 15:21:10 +1000 Subject: xfs: use xfs_da_geometry for block size in attr code Rather than using the superblock value obtained through the xfs_mount. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- fs/xfs/xfs_attr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fs/xfs/xfs_attr.c') diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 8bb9ae606593..ccfc2c9700fa 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -175,11 +175,11 @@ xfs_attr_calc_size( * "local" or "remote" (note: local != inline). */ size = xfs_attr_leaf_newentsize(args->namelen, args->valuelen, - mp->m_sb.sb_blocksize, local); + args->geo->blksize, local); nblks = XFS_DAENTER_SPACE_RES(mp, XFS_ATTR_FORK); if (*local) { - if (size > (mp->m_sb.sb_blocksize >> 1)) { + if (size > (args->geo->blksize / 2)) { /* Double split possible */ nblks *= 2; } @@ -898,7 +898,7 @@ restart: state = xfs_da_state_alloc(); state->args = args; state->mp = mp; - state->blocksize = state->mp->m_sb.sb_blocksize; + state->blocksize = args->geo->blksize; state->node_ents = args->geo->node_ents; /* @@ -1077,7 +1077,7 @@ restart: state = xfs_da_state_alloc(); state->args = args; state->mp = mp; - state->blocksize = state->mp->m_sb.sb_blocksize; + state->blocksize = args->geo->blksize; state->node_ents = args->geo->node_ents; state->inleaf = 0; error = xfs_da3_node_lookup_int(state, &retval); @@ -1169,7 +1169,7 @@ xfs_attr_node_removename(xfs_da_args_t *args) state = xfs_da_state_alloc(); state->args = args; state->mp = dp->i_mount; - state->blocksize = state->mp->m_sb.sb_blocksize; + state->blocksize = args->geo->blksize; state->node_ents = args->geo->node_ents; /* @@ -1432,7 +1432,7 @@ xfs_attr_node_get(xfs_da_args_t *args) state = xfs_da_state_alloc(); state->args = args; state->mp = args->dp->i_mount; - state->blocksize = state->mp->m_sb.sb_blocksize; + state->blocksize = args->geo->blksize; state->node_ents = args->geo->node_ents; /* -- cgit v1.2.3