]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfs/pnfs.c
Merge tag 'block-5.6-2020-02-22' of git://git.kernel.dk/linux-block
[linux.git] / fs / nfs / pnfs.c
index cec3070ab577e1425427780131b52230b7bb26ed..542ea8dfd1bc75165cc78cccd1b14d4ef650c8f1 100644 (file)
@@ -1425,7 +1425,7 @@ bool pnfs_roc(struct inode *ino,
        /* lo ref dropped in pnfs_roc_release() */
        layoutreturn = pnfs_prepare_layoutreturn(lo, &stateid, &iomode);
        /* If the creds don't match, we can't compound the layoutreturn */
-       if (!layoutreturn || cred != lo->plh_lc_cred)
+       if (!layoutreturn || cred_fscmp(cred, lo->plh_lc_cred) != 0)
                goto out_noroc;
 
        roc = layoutreturn;
@@ -1998,8 +1998,6 @@ pnfs_update_layout(struct inode *ino,
                        trace_pnfs_update_layout(ino, pos, count,
                                        iomode, lo, lseg,
                                        PNFS_UPDATE_LAYOUT_INVALID_OPEN);
-                       if (status != -EAGAIN)
-                               goto out_unlock;
                        spin_unlock(&ino->i_lock);
                        nfs4_schedule_stateid_recovery(server, ctx->state);
                        pnfs_clear_first_layoutget(lo);