From patchwork Fri Sep 25 01:32:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Schwenke X-Patchwork-Id: 11798655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9AC1C112E for ; Fri, 25 Sep 2020 01:32:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AF3B2084C for ; Fri, 25 Sep 2020 01:32:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=meltin.net header.i=@meltin.net header.b="DhZ5MdTs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726730AbgIYBcG (ORCPT ); Thu, 24 Sep 2020 21:32:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbgIYBcF (ORCPT ); Thu, 24 Sep 2020 21:32:05 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EA49C0613CE for ; Thu, 24 Sep 2020 18:32:05 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4ByDss4hjkz9sSJ; Fri, 25 Sep 2020 11:32:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=meltin.net; s=202004; t=1600997521; bh=B1gDqm6X860KDYsF37E54Nv4HdBvz+r/6OIzO1w3HSM=; h=Date:From:To:Subject:From; b=DhZ5MdTsC8T+ovxkKQs7I+MY4yP74Qn5pMh8REFkmu7SonfgzuZ7j0dYUExYoJhbB lLyJ10JyXBNEfG7xaYlptSFYMsZGREn99hUkNWb5WxblElzkU5/DCmzHHq7PtvNcAK duku/0MkqBOclo6cGEHnkw0/m1doUE86LQhz1fCbSX7DOIASqINffOvmOhnlsDInRa 8CSofsp+aAhVQRCdjKN+9n7XMvJoQoZKPnQ3HDhw5FNIVMIqGCRTKnu8bmOv57V2gs UoiS8m77vpAaNmt2QAyGrIdpv+nwkfPNs6HnAs7klwTg+efGuVac/9kvxmakrKYVDB GaEZOvcw0qElQ== Date: Fri, 25 Sep 2020 11:32:00 +1000 From: Martin Schwenke To: linux-cifs@vger.kernel.org Subject: [PATCH] mount.cifs: ignore comment mount option Message-ID: <20200925113200.371db298@martins.ozlabs.org> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org mount.cifs currently complains about the "comment" option: CIFS: Unknown mount option "comment=foo" mount(8) on Linux says: The command mount does not pass the mount options unbindable, runbindable, private, rprivate, slave, rslave, shared, rshared, auto, noauto, comment, x-*, loop, offset and sizelimit to the mount. helpers. So if mount.cifs decides to re-read /etc/fstab it should ignore the comment option. A lot of online posts say to use comment=x-gvfs-show as an option to have a Linux file manager display a mountpoint for a user mountable filesystem. While the "comment=" part is superfluous when combined with an x-* option, the problem is still difficult to debug. Patch attached... peace & happiness, martin Reviewed-by: Aurelien Aptel From 97a071f7f1bf5274c027ee92fc0f6ca629ecdd65 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 25 Sep 2020 11:16:39 +1000 Subject: [PATCH] mount.cifs: ignore comment mount option mount.cifs currently complains about the "comment" option: CIFS: Unknown mount option "comment=foo" mount(8) on Linux says: The command mount does not pass the mount options unbindable, runbindable, private, rprivate, slave, rslave, shared, rshared, auto, noauto, comment, x-*, loop, offset and sizelimit to the mount. helpers. So if mount.cifs decides to re-read /etc/fstab it should ignore the comment option. A lot of online posts say to use comment=x-gvfs-show as an option to have a Linux file manager display a mountpoint for a user mountable filesystem. While the "comment=" part is superfluous when combined with an x-* option, the problem is still difficult to debug. Signed-off-by: Martin Schwenke --- mount.cifs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mount.cifs.c b/mount.cifs.c index 4feb397..5d43c00 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -777,6 +777,8 @@ static int parse_opt_token(const char *token) return OPT_BKUPGID; if (strcmp(token, "nofail") == 0) return OPT_NOFAIL; + if (strcmp(token, "comment") == 0) + return OPT_IGNORE; if (strncmp(token, "x-", 2) == 0) return OPT_IGNORE; if (strncmp(token, "snapshot", 8) == 0) -- 2.28.0