summaryrefslogtreecommitdiffstats
path: root/fs/ceph/quota.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-11-09 16:26:18 -0600
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-09 16:26:18 -0600
commitd757a3b01e72368176c5ee580ea17f8c2d185cd7 (patch)
tree331c1f77b2814282a02d1b1cae0437b5217d2db5 /fs/ceph/quota.c
parent26eaed4671af3c4108b266504aed1103fb68a378 (diff)
parent23c625ce3065e40c933a4239efb9b11f1194a343 (diff)
downloadlinux-d757a3b01e72368176c5ee580ea17f8c2d185cd7.tar.bz2
Merge tag 'ceph-for-4.20-rc2' of https://github.com/ceph/ceph-client
Pull Ceph fixes from Ilya Dryomov: "Two CephFS fixes (copy_file_range and quota) and a small feature bit cleanup" * tag 'ceph-for-4.20-rc2' of https://github.com/ceph/ceph-client: libceph: assume argonaut on the server side ceph: quota: fix null pointer dereference in quota check ceph: add destination file data sync before doing any remote copy
Diffstat (limited to 'fs/ceph/quota.c')
-rw-r--r--fs/ceph/quota.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c
index 32d4f13784ba..03f4d24db8fe 100644
--- a/fs/ceph/quota.c
+++ b/fs/ceph/quota.c
@@ -237,7 +237,8 @@ static bool check_quota_exceeded(struct inode *inode, enum quota_check_op op,
ceph_put_snap_realm(mdsc, realm);
realm = next;
}
- ceph_put_snap_realm(mdsc, realm);
+ if (realm)
+ ceph_put_snap_realm(mdsc, realm);
up_read(&mdsc->snap_rwsem);
return exceeded;