Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4896275pxj; Tue, 25 May 2021 20:27:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlmf4klkDPDvOdMZjngR8kbcstKYU/G+mc6c0ep8BrTdS7CYZCPvY0vbyK5CPF3PBRUUlG X-Received: by 2002:a05:6638:22b4:: with SMTP id z20mr906646jas.128.1621999629764; Tue, 25 May 2021 20:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621999629; cv=none; d=google.com; s=arc-20160816; b=Nj0+llXVgqzuC5pQZe109yREW2OJ3XUOf0530fuOhXtQTHsS6jgJOrt2MDldxJj2JI aSH+AZULjXRmhR5dzYYuJPODtDLiQJ0OMnsXl5p0BQSpUi0StBJZPZKVgumPhs9bjqeV 3sUmV1ZNDT3YciieieqjKNBGtO09G+O0ZT+/3BQqIr8hmtESpCt+bo6aa/QbGhJjceq+ hou4eoJy0P2TMG+7ytNWFBCsQViSldS/r2XWbGDZaLajNOk+zRuvRx9DeOcPiGUH+4fz zeCNZy2b/ej24nguOsw3Fj/tPdFXfHgn4g36LYcA2T3uM972lL6RemmyE/SrpFnfXfFj Z81Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=xPTPK7iJSIY0cnHV+NUbOQ7j6R/sfeQ0ik0wzbH0J0k=; b=lf+gZJF13/7ulJOykRvcnMdfoJfLB8v8/oV56qwIuCXiMD4lNrkENMagjqkasenKRn U4Ec59vYDiF6LoJVUhKwes61kfmwQ1+YSe0zEeW5xm6P5aBITA/hDyhlqXSalNCfgY4v zj26Bc8wPXaqigYuU8h01+180bLB0OZwIr2fBNOoRepJEqk+YPeZTUwOyug2YSbzYcNZ 8Ly050NNpkhlnNPnk7wzDeknN0SZDBdvtoOruJlu+SVZ7LJCb/+kdlNB5CorgurFp5xf 0QRkWgCgU9khoSuoYYGUCsQlnjSWmZv+NTpzV1yR3EXAQi/2Bb+WqyYeC+raG8eGzMUR OHJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si18454167jaj.88.2021.05.25.20.26.46; Tue, 25 May 2021 20:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231784AbhEZD17 (ORCPT + 99 others); Tue, 25 May 2021 23:27:59 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3972 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbhEZD16 (ORCPT ); Tue, 25 May 2021 23:27:58 -0400 Received: from dggems702-chm.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FqbqV0LlKzQslS; Wed, 26 May 2021 11:22:46 +0800 (CST) Received: from dggpeml500023.china.huawei.com (7.185.36.114) by dggems702-chm.china.huawei.com (10.3.19.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 26 May 2021 11:26:23 +0800 Received: from localhost.localdomain (10.175.101.6) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 26 May 2021 11:26:22 +0800 From: Zhang Xiaoxu To: , , , , , Subject: [PATCH] NFSv4: Fix v4.0/v4.1 SEEK_DATA return -ENOTSUPP when set NFS_V4_2 config Date: Tue, 25 May 2021 23:32:35 -0400 Message-ID: <20210526033235.1298266-1-zhangxiaoxu5@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Since commit bdcc2cd14e4e ("NFSv4.2: handle NFS-specific llseek errors"), nfs42_proc_llseek would return -EOPNOTSUPP rather than -ENOTSUPP when SEEK_DATA on NFSv4.0/v4.1. This will lead xfstests generic/285 not run on NFSv4.0/v4.1 when set the CONFIG_NFS_V4_2, rather than run failed. Fixes: bdcc2cd14e4e ("NFSv4.2: handle NFS-specific llseek errors") Cc: # 4.2 Signed-off-by: Zhang Xiaoxu --- fs/nfs/nfs4file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 57b3821d975a..a1e5c6b85ded 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -211,7 +211,7 @@ static loff_t nfs4_file_llseek(struct file *filep, loff_t offset, int whence) case SEEK_HOLE: case SEEK_DATA: ret = nfs42_proc_llseek(filep, offset, whence); - if (ret != -ENOTSUPP) + if (ret != -EOPNOTSUPP) return ret; fallthrough; default: -- 2.25.4