aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 615f720a819d..9f0833e1631a 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -3,6 +3,7 @@
3#include <linux/wait.h> 3#include <linux/wait.h>
4#include <linux/slab.h> 4#include <linux/slab.h>
5#include <linux/sched.h> 5#include <linux/sched.h>
6#include <linux/smp_lock.h>
6 7
7#include "mds_client.h" 8#include "mds_client.h"
8#include "mon_client.h" 9#include "mon_client.h"
@@ -2335,7 +2336,22 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
2335 } 2336 }
2336 spin_unlock(&inode->i_lock); 2337 spin_unlock(&inode->i_lock);
2337 2338
2338 err = ceph_pagelist_append(pagelist, &rec, reclen); 2339 if (recon_state->flock) {
2340 int num_fcntl_locks, num_flock_locks;
2341
2342 lock_kernel();
2343 ceph_count_locks(inode, &num_fcntl_locks, &num_flock_locks);
2344 rec.v2.flock_len = (2*sizeof(u32) +
2345 (num_fcntl_locks+num_flock_locks) *
2346 sizeof(struct ceph_filelock));
2347
2348 err = ceph_pagelist_append(pagelist, &rec, reclen);
2349 if (!err)
2350 err = ceph_encode_locks(inode, pagelist,
2351 num_fcntl_locks,
2352 num_flock_locks);
2353 unlock_kernel();
2354 }
2339 2355
2340out: 2356out:
2341 kfree(path); 2357 kfree(path);