Merge tag 'nfsd-6.2-6' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
[linux-block.git] / fs / nfsd / nfs4state.c
index 0fb09e37e12fa878fc98643ed84ac3ebc127b5d0..c69f27d3adb79469eb8e7a0cda623d8816eb1224 100644 (file)
@@ -4814,7 +4814,7 @@ nfs4_share_conflict(struct svc_fh *current_fh, unsigned int deny_type)
 
 static bool nfsd4_deleg_present(const struct inode *inode)
 {
-       struct file_lock_context *ctx = smp_load_acquire(&inode->i_flctx);
+       struct file_lock_context *ctx = locks_inode_context(inode);
 
        return ctx && !list_empty_careful(&ctx->flc_lease);
 }
@@ -5947,7 +5947,7 @@ nfs4_lockowner_has_blockers(struct nfs4_lockowner *lo)
 
        list_for_each_entry(stp, &lo->lo_owner.so_stateids, st_perstateowner) {
                nf = stp->st_stid.sc_file;
-               ctx = nf->fi_inode->i_flctx;
+               ctx = locks_inode_context(nf->fi_inode);
                if (!ctx)
                        continue;
                if (locks_owner_has_blockers(ctx, lo))
@@ -7810,7 +7810,7 @@ check_for_locks(struct nfs4_file *fp, struct nfs4_lockowner *lowner)
        }
 
        inode = locks_inode(nf->nf_file);
-       flctx = inode->i_flctx;
+       flctx = locks_inode_context(inode);
 
        if (flctx && !list_empty_careful(&flctx->flc_posix)) {
                spin_lock(&flctx->flc_lock);