diff options
Diffstat (limited to 'fs/xfs/xfs_attr_list.c')
-rw-r--r-- | fs/xfs/xfs_attr_list.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/xfs_attr_list.c b/fs/xfs/xfs_attr_list.c index 2d174b128153..01db96f60cf0 100644 --- a/fs/xfs/xfs_attr_list.c +++ b/fs/xfs/xfs_attr_list.c | |||
@@ -507,17 +507,17 @@ xfs_attr_list_int( | |||
507 | { | 507 | { |
508 | int error; | 508 | int error; |
509 | xfs_inode_t *dp = context->dp; | 509 | xfs_inode_t *dp = context->dp; |
510 | uint lock_mode; | ||
510 | 511 | ||
511 | XFS_STATS_INC(xs_attr_list); | 512 | XFS_STATS_INC(xs_attr_list); |
512 | 513 | ||
513 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) | 514 | if (XFS_FORCED_SHUTDOWN(dp->i_mount)) |
514 | return EIO; | 515 | return EIO; |
515 | 516 | ||
516 | xfs_ilock(dp, XFS_ILOCK_SHARED); | ||
517 | |||
518 | /* | 517 | /* |
519 | * Decide on what work routines to call based on the inode size. | 518 | * Decide on what work routines to call based on the inode size. |
520 | */ | 519 | */ |
520 | lock_mode = xfs_ilock_attr_map_shared(dp); | ||
521 | if (!xfs_inode_hasattr(dp)) { | 521 | if (!xfs_inode_hasattr(dp)) { |
522 | error = 0; | 522 | error = 0; |
523 | } else if (dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) { | 523 | } else if (dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) { |
@@ -527,9 +527,7 @@ xfs_attr_list_int( | |||
527 | } else { | 527 | } else { |
528 | error = xfs_attr_node_list(context); | 528 | error = xfs_attr_node_list(context); |
529 | } | 529 | } |
530 | 530 | xfs_iunlock(dp, lock_mode); | |
531 | xfs_iunlock(dp, XFS_ILOCK_SHARED); | ||
532 | |||
533 | return error; | 531 | return error; |
534 | } | 532 | } |
535 | 533 | ||