diff options
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 1fab140764c4..ff10b4aa534c 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1373,13 +1373,13 @@ static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_ | |||
1373 | /* Guard against delegation returns and new lock/unlock calls */ | 1373 | /* Guard against delegation returns and new lock/unlock calls */ |
1374 | down_write(&nfsi->rwsem); | 1374 | down_write(&nfsi->rwsem); |
1375 | /* Protect inode->i_flock using the BKL */ | 1375 | /* Protect inode->i_flock using the BKL */ |
1376 | lock_flocks(); | 1376 | spin_lock(&inode->i_lock); |
1377 | for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { | 1377 | for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { |
1378 | if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) | 1378 | if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) |
1379 | continue; | 1379 | continue; |
1380 | if (nfs_file_open_context(fl->fl_file)->state != state) | 1380 | if (nfs_file_open_context(fl->fl_file)->state != state) |
1381 | continue; | 1381 | continue; |
1382 | unlock_flocks(); | 1382 | spin_unlock(&inode->i_lock); |
1383 | status = ops->recover_lock(state, fl); | 1383 | status = ops->recover_lock(state, fl); |
1384 | switch (status) { | 1384 | switch (status) { |
1385 | case 0: | 1385 | case 0: |
@@ -1406,9 +1406,9 @@ static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_ | |||
1406 | /* kill_proc(fl->fl_pid, SIGLOST, 1); */ | 1406 | /* kill_proc(fl->fl_pid, SIGLOST, 1); */ |
1407 | status = 0; | 1407 | status = 0; |
1408 | } | 1408 | } |
1409 | lock_flocks(); | 1409 | spin_lock(&inode->i_lock); |
1410 | } | 1410 | } |
1411 | unlock_flocks(); | 1411 | spin_unlock(&inode->i_lock); |
1412 | out: | 1412 | out: |
1413 | up_write(&nfsi->rwsem); | 1413 | up_write(&nfsi->rwsem); |
1414 | return status; | 1414 | return status; |