From: Sage Weil Date: Thu, 23 Sep 2010 02:57:10 +0000 (-0700) Subject: ceph: switch from BKL to lock_flocks() X-Git-Tag: v2.6.37-rc3~2^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=496e59553c51ce18acc836de070106b583926b87;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index fbfc298..3142b15 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1,11 +1,12 @@ #include +#include #include #include #include -#include #include #include +#include #include "super.h" #include "mds_client.h" @@ -2369,13 +2370,13 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, ceph_pagelist_set_cursor(pagelist, &trunc_point); do { - lock_kernel(); + lock_flocks(); ceph_count_locks(inode, &num_fcntl_locks, &num_flock_locks); rec.v2.flock_len = (2*sizeof(u32) + (num_fcntl_locks+num_flock_locks) * sizeof(struct ceph_filelock)); - unlock_kernel(); + unlock_flocks(); /* pre-alloc pagelist */ ceph_pagelist_truncate(pagelist, &trunc_point); @@ -2386,12 +2387,12 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, /* encode locks */ if (!err) { - lock_kernel(); + lock_flocks(); err = ceph_encode_locks(inode, pagelist, num_fcntl_locks, num_flock_locks); - unlock_kernel(); + unlock_flocks(); } } while (err == -ENOSPC); } else {