Skip to content

Commit

Permalink
ceph: fix dir_auth check in ceph_fill_dirfrag()
Browse files Browse the repository at this point in the history
-1 is CDIR_AUTH_PARENT, it means dir's auth mds is the same as
inode's auth mds

Signed-off-by: Yan, Zheng <[email protected]>
  • Loading branch information
ukernel authored and idryomov committed May 25, 2016
1 parent a407846 commit 4217211
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 4217211

Please sign in to comment.