ceph: switch from BKL to lock_flocks()

Switch from using the BKL explicitly to the new lock_flocks() interface.
Eventually this will turn into a spinlock.

Signed-off-by: Sage Weil <sage@newdream.net>

Sage Weil 496e5955 fca4451a

+6 -5
+6 -5
fs/ceph/mds_client.c
··· 1 1 #include <linux/ceph/ceph_debug.h> 2 2 3 + #include <linux/fs.h> 3 4 #include <linux/wait.h> 4 5 #include <linux/slab.h> 5 6 #include <linux/sched.h> 6 - #include <linux/smp_lock.h> 7 7 #include <linux/debugfs.h> 8 8 #include <linux/seq_file.h> 9 + #include <linux/smp_lock.h> 9 10 10 11 #include "super.h" 11 12 #include "mds_client.h" ··· 2370 2369 2371 2370 ceph_pagelist_set_cursor(pagelist, &trunc_point); 2372 2371 do { 2373 - lock_kernel(); 2372 + lock_flocks(); 2374 2373 ceph_count_locks(inode, &num_fcntl_locks, 2375 2374 &num_flock_locks); 2376 2375 rec.v2.flock_len = (2*sizeof(u32) + 2377 2376 (num_fcntl_locks+num_flock_locks) * 2378 2377 sizeof(struct ceph_filelock)); 2379 - unlock_kernel(); 2378 + unlock_flocks(); 2380 2379 2381 2380 /* pre-alloc pagelist */ 2382 2381 ceph_pagelist_truncate(pagelist, &trunc_point); ··· 2387 2386 2388 2387 /* encode locks */ 2389 2388 if (!err) { 2390 - lock_kernel(); 2389 + lock_flocks(); 2391 2390 err = ceph_encode_locks(inode, 2392 2391 pagelist, 2393 2392 num_fcntl_locks, 2394 2393 num_flock_locks); 2395 - unlock_kernel(); 2394 + unlock_flocks(); 2396 2395 } 2397 2396 } while (err == -ENOSPC); 2398 2397 } else {