aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svcsubs.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-07-12 06:34:42 -0400
committerThomas Gleixner <tglx@linutronix.de>2013-07-12 06:34:42 -0400
commitf2006e27396f55276f24434f56e208d86e7f9908 (patch)
tree71896db916d33888b4286f80117d3cac0da40e6d /fs/lockd/svcsubs.c
parente399eb56a6110e13f97e644658648602e2b08de7 (diff)
parent9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e (diff)
Merge branch 'linus' into timers/urgent
Get upstream changes so we can apply fixes against them Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/lockd/svcsubs.c')
-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 97e87415b145..dc5c75930f0f 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -169,7 +169,7 @@ nlm_traverse_locks(struct nlm_host *host, struct nlm_file *file,
169 169
170again: 170again:
171 file->f_locks = 0; 171 file->f_locks = 0;
172 lock_flocks(); /* protects i_flock list */ 172 spin_lock(&inode->i_lock);
173 for (fl = inode->i_flock; fl; fl = fl->fl_next) { 173 for (fl = inode->i_flock; fl; fl = fl->fl_next) {
174 if (fl->fl_lmops != &nlmsvc_lock_operations) 174 if (fl->fl_lmops != &nlmsvc_lock_operations)
175 continue; 175 continue;
@@ -181,7 +181,7 @@ again:
181 if (match(lockhost, host)) { 181 if (match(lockhost, host)) {
182 struct file_lock lock = *fl; 182 struct file_lock lock = *fl;
183 183
184 unlock_flocks(); 184 spin_unlock(&inode->i_lock);
185 lock.fl_type = F_UNLCK; 185 lock.fl_type = F_UNLCK;
186 lock.fl_start = 0; 186 lock.fl_start = 0;
187 lock.fl_end = OFFSET_MAX; 187 lock.fl_end = OFFSET_MAX;
@@ -193,7 +193,7 @@ again:
193 goto again; 193 goto again;
194 } 194 }
195 } 195 }
196 unlock_flocks(); 196 spin_unlock(&inode->i_lock);
197 197
198 return 0; 198 return 0;
199} 199}
@@ -228,14 +228,14 @@ nlm_file_inuse(struct nlm_file *file)
228 if (file->f_count || !list_empty(&file->f_blocks) || file->f_shares) 228 if (file->f_count || !list_empty(&file->f_blocks) || file->f_shares)
229 return 1; 229 return 1;
230 230
231 lock_flocks(); 231 spin_lock(&inode->i_lock);
232 for (fl = inode->i_flock; fl; fl = fl->fl_next) { 232 for (fl = inode->i_flock; fl; fl = fl->fl_next) {
233 if (fl->fl_lmops == &nlmsvc_lock_operations) { 233 if (fl->fl_lmops == &nlmsvc_lock_operations) {
234 unlock_flocks(); 234 spin_unlock(&inode->i_lock);
235 return 1; 235 return 1;
236 } 236 }
237 } 237 }
238 unlock_flocks(); 238 spin_unlock(&inode->i_lock);
239 file->f_locks = 0; 239 file->f_locks = 0;
240 return 0; 240 return 0;
241} 241}