From: Yan, Zheng Date: Tue, 3 May 2016 14:33:20 +0000 (+0800) Subject: ceph: fix dir_auth check in ceph_fill_dirfrag() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=421721195a68f46a8218c664154076b5b06f5f51;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ceph: fix dir_auth check in ceph_fill_dirfrag() -1 is CDIR_AUTH_PARENT, it means dir's auth mds is the same as inode's auth mds Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index d91eb6b49259..562f57d15f46 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -254,6 +254,9 @@ static int ceph_fill_dirfrag(struct inode *inode, diri_auth = ci->i_auth_cap->mds; spin_unlock(&ci->i_ceph_lock); + if (mds == -1) /* CDIR_AUTH_PARENT */ + mds = diri_auth; + mutex_lock(&ci->i_fragtree_mutex); if (ndist == 0 && mds == diri_auth) { /* no delegation info needed. */