aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/ceph_fs.h21
-rw-r--r--fs/ceph/mds_client.c4
2 files changed, 13 insertions, 12 deletions
diff --git a/fs/ceph/ceph_fs.h b/fs/ceph/ceph_fs.h
index 3b9eeed097b3..2fa992eaf7da 100644
--- a/fs/ceph/ceph_fs.h
+++ b/fs/ceph/ceph_fs.h
@@ -265,16 +265,17 @@ extern const char *ceph_mds_state_name(int s);
265 * - they also define the lock ordering by the MDS 265 * - they also define the lock ordering by the MDS
266 * - a few of these are internal to the mds 266 * - a few of these are internal to the mds
267 */ 267 */
268#define CEPH_LOCK_DN 1 268#define CEPH_LOCK_DVERSION 1
269#define CEPH_LOCK_ISNAP 2 269#define CEPH_LOCK_DN 2
270#define CEPH_LOCK_IVERSION 4 /* mds internal */ 270#define CEPH_LOCK_ISNAP 16
271#define CEPH_LOCK_IFILE 8 /* mds internal */ 271#define CEPH_LOCK_IVERSION 32 /* mds internal */
272#define CEPH_LOCK_IAUTH 32 272#define CEPH_LOCK_IFILE 64
273#define CEPH_LOCK_ILINK 64 273#define CEPH_LOCK_IAUTH 128
274#define CEPH_LOCK_IDFT 128 /* dir frag tree */ 274#define CEPH_LOCK_ILINK 256
275#define CEPH_LOCK_INEST 256 /* mds internal */ 275#define CEPH_LOCK_IDFT 512 /* dir frag tree */
276#define CEPH_LOCK_IXATTR 512 276#define CEPH_LOCK_INEST 1024 /* mds internal */
277#define CEPH_LOCK_INO 2048 /* immutable inode bits; not a lock */ 277#define CEPH_LOCK_IXATTR 2048
278#define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */
278 279
279/* client_session ops */ 280/* client_session ops */
280enum { 281enum {
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 08413c8a85b2..5a88b7bb3798 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2541,7 +2541,7 @@ void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session,
2541 return; 2541 return;
2542 lease = msg->front.iov_base; 2542 lease = msg->front.iov_base;
2543 lease->action = action; 2543 lease->action = action;
2544 lease->mask = cpu_to_le16(CEPH_LOCK_DN); 2544 lease->mask = cpu_to_le16(1);
2545 lease->ino = cpu_to_le64(ceph_vino(inode).ino); 2545 lease->ino = cpu_to_le64(ceph_vino(inode).ino);
2546 lease->first = lease->last = cpu_to_le64(ceph_vino(inode).snap); 2546 lease->first = lease->last = cpu_to_le64(ceph_vino(inode).snap);
2547 lease->seq = cpu_to_le32(seq); 2547 lease->seq = cpu_to_le32(seq);
@@ -2571,7 +2571,7 @@ void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, struct inode *inode,
2571 2571
2572 BUG_ON(inode == NULL); 2572 BUG_ON(inode == NULL);
2573 BUG_ON(dentry == NULL); 2573 BUG_ON(dentry == NULL);
2574 BUG_ON(mask != CEPH_LOCK_DN); 2574 BUG_ON(mask == 0);
2575 2575
2576 /* is dentry lease valid? */ 2576 /* is dentry lease valid? */
2577 spin_lock(&dentry->d_lock); 2577 spin_lock(&dentry->d_lock);