ceph: add d_drop for some error cases in ceph_symlink()

When file num exceeds quota limit, should call d_drop to drop
dentry from cache as well.

Signed-off-by: Chengguang Xu <[email protected]>
Reviewed-by: "Yan, Zheng" <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
This commit is contained in:
Chengguang Xu authored and Ilya Dryomov committed 2018-08-02 21:26:12 +02:00
1 parent 0459871c49
commit 67fcd15140
1 file changed
+4 -2
+4 -2
View File
@@ -885,8 +885,10 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry,
if (ceph_snap(dir) != CEPH_NOSNAP)
return -EROFS;
if (ceph_quota_is_max_files_exceeded(dir))
return -EDQUOT;
if (ceph_quota_is_max_files_exceeded(dir)) {
err = -EDQUOT;
goto out;
}
dout("symlink in dir %p dentry %p to '%s'\n", dir, dentry, dest);
req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS);