Commit 67fcd151 authored by Chengguang Xu's avatar Chengguang Xu Committed by Ilya Dryomov

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: default avatarChengguang Xu <cgxu519@gmx.com>
Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 0459871c
...@@ -885,8 +885,10 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry, ...@@ -885,8 +885,10 @@ static int ceph_symlink(struct inode *dir, struct dentry *dentry,
if (ceph_snap(dir) != CEPH_NOSNAP) if (ceph_snap(dir) != CEPH_NOSNAP)
return -EROFS; return -EROFS;
if (ceph_quota_is_max_files_exceeded(dir)) if (ceph_quota_is_max_files_exceeded(dir)) {
return -EDQUOT; err = -EDQUOT;
goto out;
}
dout("symlink in dir %p dentry %p to '%s'\n", dir, dentry, dest); 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); req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SYMLINK, USE_AUTH_MDS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment