Loading fs/ceph/super.c +15 −18 Original line number Diff line number Diff line Loading @@ -793,9 +793,10 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, struct dentry *root; int first = 0; /* first vfsmount for this super_block */ dout("mount start\n"); dout("mount start %p\n", fsc); mutex_lock(&fsc->client->mount_mutex); if (!fsc->sb->s_root) { err = __ceph_open_session(fsc->client, started); if (err < 0) goto out; Loading @@ -806,9 +807,6 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, err = PTR_ERR(root); goto out; } if (fsc->sb->s_root) { dput(root); } else { fsc->sb->s_root = root; first = 1; Loading @@ -818,6 +816,7 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, } if (path[0] == 0) { root = fsc->sb->s_root; dget(root); } else { dout("mount opening base mountpoint\n"); Loading @@ -833,16 +832,14 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, mutex_unlock(&fsc->client->mount_mutex); return root; out: mutex_unlock(&fsc->client->mount_mutex); return ERR_PTR(err); fail: if (first) { dput(fsc->sb->s_root); fsc->sb->s_root = NULL; } goto out; out: mutex_unlock(&fsc->client->mount_mutex); return ERR_PTR(err); } static int ceph_set_super(struct super_block *s, void *data) Loading Loading
fs/ceph/super.c +15 −18 Original line number Diff line number Diff line Loading @@ -793,9 +793,10 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, struct dentry *root; int first = 0; /* first vfsmount for this super_block */ dout("mount start\n"); dout("mount start %p\n", fsc); mutex_lock(&fsc->client->mount_mutex); if (!fsc->sb->s_root) { err = __ceph_open_session(fsc->client, started); if (err < 0) goto out; Loading @@ -806,9 +807,6 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, err = PTR_ERR(root); goto out; } if (fsc->sb->s_root) { dput(root); } else { fsc->sb->s_root = root; first = 1; Loading @@ -818,6 +816,7 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, } if (path[0] == 0) { root = fsc->sb->s_root; dget(root); } else { dout("mount opening base mountpoint\n"); Loading @@ -833,16 +832,14 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, mutex_unlock(&fsc->client->mount_mutex); return root; out: mutex_unlock(&fsc->client->mount_mutex); return ERR_PTR(err); fail: if (first) { dput(fsc->sb->s_root); fsc->sb->s_root = NULL; } goto out; out: mutex_unlock(&fsc->client->mount_mutex); return ERR_PTR(err); } static int ceph_set_super(struct super_block *s, void *data) Loading