afs: Fix cell refcounting by splitting the usage counter
[linux-block.git] / fs / afs / mntpt.c
index 79bc5f1338edfb51e98f67ca47e167c32c903f18..c69a0282960cca6ce4745902d2f33ebe78c58540 100644 (file)
@@ -88,7 +88,7 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
                ctx->force = true;
        }
        if (ctx->cell) {
-               afs_put_cell(ctx->net, ctx->cell);
+               afs_unuse_cell(ctx->net, ctx->cell);
                ctx->cell = NULL;
        }
        if (test_bit(AFS_VNODE_PSEUDODIR, &vnode->flags)) {
@@ -124,7 +124,7 @@ static int afs_mntpt_set_params(struct fs_context *fc, struct dentry *mntpt)
                char *buf;
 
                if (src_as->cell)
-                       ctx->cell = afs_get_cell(src_as->cell);
+                       ctx->cell = afs_use_cell(src_as->cell);
 
                if (size < 2 || size > PAGE_SIZE - 1)
                        return -EINVAL;