diff options
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r-- | fs/xfs/xfs_attr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index b86127072ac3..01b6a0102fbd 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -164,6 +164,7 @@ xfs_attr_get( | |||
164 | { | 164 | { |
165 | int error; | 165 | int error; |
166 | struct xfs_name xname; | 166 | struct xfs_name xname; |
167 | uint lock_mode; | ||
167 | 168 | ||
168 | XFS_STATS_INC(xs_attr_get); | 169 | XFS_STATS_INC(xs_attr_get); |
169 | 170 | ||
@@ -174,9 +175,9 @@ xfs_attr_get( | |||
174 | if (error) | 175 | if (error) |
175 | return error; | 176 | return error; |
176 | 177 | ||
177 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 178 | lock_mode = xfs_ilock_attr_map_shared(ip); |
178 | error = xfs_attr_get_int(ip, &xname, value, valuelenp, flags); | 179 | error = xfs_attr_get_int(ip, &xname, value, valuelenp, flags); |
179 | xfs_iunlock(ip, XFS_ILOCK_SHARED); | 180 | xfs_iunlock(ip, lock_mode); |
180 | return(error); | 181 | return(error); |
181 | } | 182 | } |
182 | 183 | ||