From nobody Thu Oct 13 15:43:54 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MpDMZ4K4pz4f14J; Thu, 13 Oct 2022 15:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MpDMZ3pCbz3S2q; Thu, 13 Oct 2022 15:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665675834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FD0kYr4w2Rr/J8rSy5Z61hxzBSTNTll47qZPObw0P4=; b=SR1QBDUgMWAc4wY4EICsbYyVzYAjAuOwnvf6AuQuSlCarZuCI9spz6S4gPvCjuvPYplQKi 4qCxt1GZqI5VEBpF/BFc48mrX036Chj92vK3qbYE06UdXQp2ckkQbO0ekc7PCRJ5SeTCwP wIZBD5yg62YdiEoL3xMySYvwp1DG3hPinBKkispKF3ovaQ+I/fnubeLM/JkDODdYuKmqVy sBEFNnpGbZw03eG9fiuq+rjBLZCb8JDJeNv+eMAHXo5Y30KEHI3L/zRSzBWVEoXTknH8Gj kRQmEMr+lpSIfjUJauvzX13N6I4/Onow5NW2Yd8nE5+2bZAdCdHBTbCLs/J6+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MpDMZ2rVNzSfQ; Thu, 13 Oct 2022 15:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29DFhsXZ022717; Thu, 13 Oct 2022 15:43:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29DFhsuK022716; Thu, 13 Oct 2022 15:43:54 GMT (envelope-from git) Date: Thu, 13 Oct 2022 15:43:54 GMT Message-Id: <202210131543.29DFhsuK022716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 0ae91878cc45 - stable/13 - When taking a snapshot on a UFS/FFS filesystem, it must be mounted. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0ae91878cc451ce5d45bbec815db830e0bc4c591 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665675834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+FD0kYr4w2Rr/J8rSy5Z61hxzBSTNTll47qZPObw0P4=; b=vNYmQ7xMnMv5lpE/AGhz6l1nDSP7W67hhHAMZOwB7g39aAKcBqWeWdWj811ClsMSyc4Fu9 J/ZprwxGSxce0u3FTom2s5klod2mJbNBaSWaE4pXO0jTvPJyRuySLU+I029Y8VenwdVJ4i /7kwrosr5Ug7KcS6NBRleZ+8A9Ts3xkoIoMrRFj9c7OgWH/UOV9cbasXyozl6Md9ZVUeko vW6d8QgxxtHCFejZ+B4TrhW5JEJhvub6oygYBG7+zKcApvsfQXDXMs7mFEowIL8EYUdRR7 HxkhiVbj3TSJ3KsGwws+V2IdJl7entm+V4A5wiscBQeJ8yAbmV0737YuS6EWMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665675834; a=rsa-sha256; cv=none; b=bDHsnd8EE0oat7LD4MswdJVXgK/PUsW2XX9vtHJAnljU3TIZ1MOgbjjO/7MH4CUTzDZqBQ SUjo4QIhtUMHSGqOXx7rzp76MTjABQ0aDZfxkeeVv682QTq/Mbu5sNfGdZ4mn3R1Ct9Cy3 xLUk1TqJumX7uUJsAFwa0z7Vng6sBK04m47jKPVZoyjLS/x+3JicN9/6I8o00chOdDnvsR 9piduP73rFUZFc7LhR/4NNlu85NHQ5+JoU68tczQnSNFAwws1VJu7iXScXwmhKQZxg/2o0 Xrlv/IrHLP1edoCxRdjrAael8EhmeyBddG625GYo7ZhthPRWKPsjQ2Yy4UvB0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=0ae91878cc451ce5d45bbec815db830e0bc4c591 commit 0ae91878cc451ce5d45bbec815db830e0bc4c591 Author: Kirk McKusick AuthorDate: 2022-09-27 15:57:30 +0000 Commit: Kirk McKusick CommitDate: 2022-10-13 15:43:41 +0000 When taking a snapshot on a UFS/FFS filesystem, it must be mounted. PR: 265362 Sponsored by: The FreeBSD Foundation (cherry picked from commit 27d673fbbb79b1b829484ec127da59b45f623ebd) --- sys/ufs/ffs/ffs_vfsops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 5daf8e0e607e..2d5db7722a0f 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -440,8 +440,11 @@ ffs_mount(struct mount *mp) /* * If this is a snapshot request, take the snapshot. */ - if (mp->mnt_flag & MNT_SNAPSHOT) + if (mp->mnt_flag & MNT_SNAPSHOT) { + if ((mp->mnt_flag & MNT_UPDATE) == 0) + return (EINVAL); return (ffs_snapshot(mp, fspec)); + } /* * Must not call namei() while owning busy ref.