diff options
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 322ba094dcc8..308dfff76ae2 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -1982,7 +1982,7 @@ again: | |||
1982 | 1982 | ||
1983 | ips[0] = ip; | 1983 | ips[0] = ip; |
1984 | ips[1] = dp; | 1984 | ips[1] = dp; |
1985 | xfs_lock_inodes(ips, 2, 0, XFS_ILOCK_EXCL); | 1985 | xfs_lock_inodes(ips, 2, XFS_ILOCK_EXCL); |
1986 | } | 1986 | } |
1987 | /* else e_inum == dp->i_ino */ | 1987 | /* else e_inum == dp->i_ino */ |
1988 | /* This can happen if we're asked to lock /x/.. | 1988 | /* This can happen if we're asked to lock /x/.. |
@@ -2030,7 +2030,6 @@ void | |||
2030 | xfs_lock_inodes( | 2030 | xfs_lock_inodes( |
2031 | xfs_inode_t **ips, | 2031 | xfs_inode_t **ips, |
2032 | int inodes, | 2032 | int inodes, |
2033 | int first_locked, | ||
2034 | uint lock_mode) | 2033 | uint lock_mode) |
2035 | { | 2034 | { |
2036 | int attempts = 0, i, j, try_lock; | 2035 | int attempts = 0, i, j, try_lock; |
@@ -2038,13 +2037,8 @@ xfs_lock_inodes( | |||
2038 | 2037 | ||
2039 | ASSERT(ips && (inodes >= 2)); /* we need at least two */ | 2038 | ASSERT(ips && (inodes >= 2)); /* we need at least two */ |
2040 | 2039 | ||
2041 | if (first_locked) { | 2040 | try_lock = 0; |
2042 | try_lock = 1; | 2041 | i = 0; |
2043 | i = 1; | ||
2044 | } else { | ||
2045 | try_lock = 0; | ||
2046 | i = 0; | ||
2047 | } | ||
2048 | 2042 | ||
2049 | again: | 2043 | again: |
2050 | for (; i < inodes; i++) { | 2044 | for (; i < inodes; i++) { |
@@ -2406,7 +2400,7 @@ xfs_link( | |||
2406 | ips[1] = sip; | 2400 | ips[1] = sip; |
2407 | } | 2401 | } |
2408 | 2402 | ||
2409 | xfs_lock_inodes(ips, 2, 0, XFS_ILOCK_EXCL); | 2403 | xfs_lock_inodes(ips, 2, XFS_ILOCK_EXCL); |
2410 | 2404 | ||
2411 | /* | 2405 | /* |
2412 | * Increment vnode ref counts since xfs_trans_commit & | 2406 | * Increment vnode ref counts since xfs_trans_commit & |