aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svcsubs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index 5300bb53835f..665ef5a05183 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -171,7 +171,7 @@ nlm_traverse_locks(struct nlm_host *host, struct nlm_file *file,
171 return 0; 171 return 0;
172again: 172again:
173 file->f_locks = 0; 173 file->f_locks = 0;
174 spin_lock(&inode->i_lock); 174 spin_lock(&flctx->flc_lock);
175 list_for_each_entry(fl, &flctx->flc_posix, fl_list) { 175 list_for_each_entry(fl, &flctx->flc_posix, fl_list) {
176 if (fl->fl_lmops != &nlmsvc_lock_operations) 176 if (fl->fl_lmops != &nlmsvc_lock_operations)
177 continue; 177 continue;
@@ -183,7 +183,7 @@ again:
183 if (match(lockhost, host)) { 183 if (match(lockhost, host)) {
184 struct file_lock lock = *fl; 184 struct file_lock lock = *fl;
185 185
186 spin_unlock(&inode->i_lock); 186 spin_unlock(&flctx->flc_lock);
187 lock.fl_type = F_UNLCK; 187 lock.fl_type = F_UNLCK;
188 lock.fl_start = 0; 188 lock.fl_start = 0;
189 lock.fl_end = OFFSET_MAX; 189 lock.fl_end = OFFSET_MAX;
@@ -195,7 +195,7 @@ again:
195 goto again; 195 goto again;
196 } 196 }
197 } 197 }
198 spin_unlock(&inode->i_lock); 198 spin_unlock(&flctx->flc_lock);
199 199
200 return 0; 200 return 0;
201} 201}
@@ -232,14 +232,14 @@ nlm_file_inuse(struct nlm_file *file)
232 return 1; 232 return 1;
233 233
234 if (flctx && !list_empty_careful(&flctx->flc_posix)) { 234 if (flctx && !list_empty_careful(&flctx->flc_posix)) {
235 spin_lock(&inode->i_lock); 235 spin_lock(&flctx->flc_lock);
236 list_for_each_entry(fl, &flctx->flc_posix, fl_list) { 236 list_for_each_entry(fl, &flctx->flc_posix, fl_list) {
237 if (fl->fl_lmops == &nlmsvc_lock_operations) { 237 if (fl->fl_lmops == &nlmsvc_lock_operations) {
238 spin_unlock(&inode->i_lock); 238 spin_unlock(&flctx->flc_lock);
239 return 1; 239 return 1;
240 } 240 }
241 } 241 }
242 spin_unlock(&inode->i_lock); 242 spin_unlock(&flctx->flc_lock);
243 } 243 }
244 file->f_locks = 0; 244 file->f_locks = 0;
245 return 0; 245 return 0;