From: Dai Ngo Date: Wed, 5 Nov 2025 20:45:54 +0000 (-0800) Subject: NFSD: use correct reservation type in nfsd4_scsi_fence_client X-Git-Tag: v6.19-rc1~77^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f52063db9aabdaabea929b1e998af98c2e8d917;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Christoph Hellwig Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c index 101cccbee4a39..06769576e309c 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 = {