From: Jeff Layton Date: Thu, 20 Aug 2020 15:00:26 +0000 (-0400) Subject: ceph: don't allow setlease on cephfs X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=496ceaf12432b3d136dcdec48424312e71359ea7;p=uclinux-h8%2Flinux.git ceph: don't allow setlease on cephfs Leases don't currently work correctly on kcephfs, as they are not broken when caps are revoked. They could eventually be implemented similarly to how we did them in libcephfs, but for now don't allow them. [ idryomov: no need for simple_nosetlease() in ceph_dir_fops and ceph_snapdir_fops ] Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 81d2cc8dbb6d..7661a3f47772 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -2507,6 +2507,7 @@ const struct file_operations ceph_file_fops = { .mmap = ceph_mmap, .fsync = ceph_fsync, .lock = ceph_lock, + .setlease = simple_nosetlease, .flock = ceph_flock, .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write,