summaryrefslogtreecommitdiff
path: root/fs/ceph/dir.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2018-01-12 16:26:17 +0800
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 11:17:52 +0200
commit2596366907f872de7be0557720bb55bccf7489d9 (patch)
tree9b89462ea14d9a0b812f580eaea72991343f654d /fs/ceph/dir.c
parent1ab302a0cb1455631646aa66b7fc02afd617ea4f (diff)
ceph: don't check quota for snap inode
snap inode's i_snap_realm is not pointing to ceph_snap_realm. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r--fs/ceph/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index 1f60498c4631..6cd92a0e2af9 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -936,7 +936,8 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
goto out;
}
- if (ceph_quota_is_max_files_exceeded(dir)) {
+ if (op == CEPH_MDS_OP_MKDIR &&
+ ceph_quota_is_max_files_exceeded(dir)) {
err = -EDQUOT;
goto out;
}