From patchwork Fri Sep 15 06:21:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13386379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DADA1EE3F2E for ; Fri, 15 Sep 2023 06:22:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232196AbjIOGWV (ORCPT ); Fri, 15 Sep 2023 02:22:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232148AbjIOGWV (ORCPT ); Fri, 15 Sep 2023 02:22:21 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67385270B for ; Thu, 14 Sep 2023 23:22:13 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-501bd6f7d11so2917301e87.1 for ; Thu, 14 Sep 2023 23:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694758931; x=1695363731; darn=vger.kernel.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=2RccZgHor3QZym6ylEU6M76/5lXyfHljjADUUYosgcI=; b=cyM0TxEDhNGiXrmdsjuuAmyA3J3HTojfffgTgfyhppWOK9YCoFcKXh3pA6j8PYSPiI UQoAyCm/ZJYVSbzf4Zt57JPUZ3ERh+aVTYtxPO/mVRTPyN0EoigpUFdGtFdlDavzEk+e +TbBRMDebttBX7K9cSi/CRgVoFq8OJKd5OyDHSUV3AI6WsBVJUee6nrCuOZJRunzqQYY q/uKfYPIB2u70Fy9iVAmxKi3xz6trJ8SzYuAdQDFOr3lgp2c9+yAspLkf+RWqhiDlbES cyg1UHDBH9ShOXRC7Fi3R1MRQ0v7ccwWD8dr5EW/KWlRjhF1fvEzn5JNJ/J1oaTkKeh0 QbzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694758931; x=1695363731; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2RccZgHor3QZym6ylEU6M76/5lXyfHljjADUUYosgcI=; b=YRvJwu0X0oVDP66qXE5GuvPDcer8lMZqg0Re89yANlHBcxmckydVJfkZTA5ZIX15t6 Qi8fRwdpoE1nOEHSbTveChXKF4tkL/soXkmWWwcgWbWXs8D5tkADIu9004jdAlkLWr2c ur3pnZ/xH4bip4sIady0f4uQbhu9sua6v4Q0Vdx1qb1xa08shmuTpKgSShcmNyNWLa/q cHoVouHxT9H6/YV5dfJqrIn1LsPSivVK/56Qp0sQQvtedxuG8QyfjrqT/Qa03DCxRkCA Lf9Ju4TPxhL+Uh2Xjf9FUBruGvP+F6WEP+9YtSbnix1U38ihpigKieZ8x4SKi2rJbSW1 7qfg== X-Gm-Message-State: AOJu0Yxy8AXJYtCpwSS9btsfrIBYoySOYmulMcDTAIXAu3i32B/zW9eI gJCQQq1j8voSHs5r9jl1Jap1klkLj/IMisNeeKi0WPNHKEE= X-Google-Smtp-Source: AGHT+IEckzRSQIR1DR3VSVC+k2EagreCuK0ZkTOSAdZtLoiIvJMyu530j06nhuNLTXt3DmAkjnyBBQIS5ci9xbobsDU= X-Received: by 2002:ac2:58d7:0:b0:4fd:cbd6:d2ff with SMTP id u23-20020ac258d7000000b004fdcbd6d2ffmr563386lfo.33.1694758931070; Thu, 14 Sep 2023 23:22:11 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Fri, 15 Sep 2023 01:21:59 -0500 Message-ID: Subject: [PATCH][SMB3] minor cleanup fix To: CIFS Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org checkpatch flagged a few places with: WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP Also fixed minor typo Signed-off-by: Steve French --- fs/smb/client/inode.c | 2 +- fs/smb/client/smb2ops.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rc = -ENOSPC; @@ -4591,7 +4591,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid, if (shdr->Command != SMB2_READ) { cifs_server_dbg(VFS, "only big read responses are supported\n"); - return -ENOTSUPP; + return -EOPNOTSUPP; } if (server->ops->is_session_expired && From ebc3d4e44a7e05457825e03d0560153687265523 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 15 Sep 2023 01:10:40 -0500 Subject: [PATCH] smb3: correct places where ENOTSUPP is used instead of preferred EOPNOTSUPP checkpatch flagged a few places with: WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP Also fixed minor typo Signed-off-by: Steve French --- fs/smb/client/inode.c | 2 +- fs/smb/client/smb2ops.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c index de2dfbaae821..d7c302442c1e 100644 --- a/fs/smb/client/inode.c +++ b/fs/smb/client/inode.c @@ -2680,7 +2680,7 @@ int cifs_fiemap(struct inode *inode, struct fiemap_extent_info *fei, u64 start, } cifsFileInfo_put(cfile); - return -ENOTSUPP; + return -EOPNOTSUPP; } int cifs_truncate_page(struct address_space *mapping, loff_t from) diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index d9eda2e958b4..9aeecee6b91b 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -297,7 +297,7 @@ smb2_adjust_credits(struct TCP_Server_Info *server, cifs_server_dbg(VFS, "request has less credits (%d) than required (%d)", credits->value, new_val); - return -ENOTSUPP; + return -EOPNOTSUPP; } spin_lock(&server->req_lock); @@ -1161,7 +1161,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, /* Use a fudge factor of 256 bytes in case we collide * with a different set_EAs command. */ - if(CIFSMaxBufSize - MAX_SMB2_CREATE_RESPONSE_SIZE - + if (CIFSMaxBufSize - MAX_SMB2_CREATE_RESPONSE_SIZE - MAX_SMB2_CLOSE_RESPONSE_SIZE - 256 < used_len + ea_name_len + ea_value_len + 1) { rc = -ENOSPC; @@ -4591,7 +4591,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid, if (shdr->Command != SMB2_READ) { cifs_server_dbg(VFS, "only big read responses are supported\n"); - return -ENOTSUPP; + return -EOPNOTSUPP; } if (server->ops->is_session_expired && -- 2.39.2