diff options
| author | Dai Ngo <dai.ngo@oracle.com> | 2025-11-05 12:45:54 -0800 |
|---|---|---|
| committer | Chuck Lever <chuck.lever@oracle.com> | 2025-11-25 09:09:42 -0500 |
| commit | 6f52063db9aabdaabea929b1e998af98c2e8d917 (patch) | |
| tree | 805fb64a752aceca34982ed731d9418c4c299991 | |
| parent | 1c873a2fd1109302a7687524d541ed815c13c026 (diff) | |
NFSD: use correct reservation type in nfsd4_scsi_fence_client
The reservation type argument for the pr_preempt call should match the
one used in nfsd4_block_get_device_info_scsi.
Fixes: f99d4fbdae67 ("nfsd: add SCSI layout support")
Cc: stable@vger.kernel.org
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
| -rw-r--r-- | fs/nfsd/blocklayout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index 101cccbee4a3..06769576e309 100644 --- a/fs/nfsd/blocklayout.c +++ b/fs/nfsd/blocklayout.c @@ -400,7 +400,8 @@ nfsd4_scsi_fence_client(struct nfs4_layout_stateid *ls, struct nfsd_file *file) struct block_device *bdev = file->nf_file->f_path.mnt->mnt_sb->s_bdev; bdev->bd_disk->fops->pr_ops->pr_preempt(bdev, NFSD_MDS_PR_KEY, - nfsd4_scsi_pr_key(clp), 0, true); + nfsd4_scsi_pr_key(clp), + PR_EXCLUSIVE_ACCESS_REG_ONLY, true); } const struct nfsd4_layout_ops scsi_layout_ops = { |
