Skip to content

Commit 97a728f

Browse files
author
Trond Myklebust
committed
NFS/pnfs: Fix dereference of layout cred in pnfs_layoutcommit_inode()
Ensure that the dereference of the layout cred is atomic with the stateid. Signed-off-by: Trond Myklebust <[email protected]>
1 parent fc51b1c commit 97a728f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/pnfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3137,10 +3137,10 @@ pnfs_layoutcommit_inode(struct inode *inode, bool sync)
31373137
end_pos = nfsi->layout->plh_lwb;
31383138

31393139
nfs4_stateid_copy(&data->args.stateid, &nfsi->layout->plh_stateid);
3140+
data->cred = get_cred(nfsi->layout->plh_lc_cred);
31403141
spin_unlock(&inode->i_lock);
31413142

31423143
data->args.inode = inode;
3143-
data->cred = get_cred(nfsi->layout->plh_lc_cred);
31443144
nfs_fattr_init(&data->fattr);
31453145
data->args.bitmask = NFS_SERVER(inode)->cache_consistency_bitmask;
31463146
data->res.fattr = &data->fattr;

0 commit comments

Comments
 (0)