All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org,
	Anand Suveer Jain <asj@kernel.org>, Chao Yu <chao@kernel.org>,
	Christoph Hellwig <hch@infradead.org>
Subject: [PATCH v3 5/6] common/rc: use common helper in _require_fanotify_ioerrors for f2fs
Date: Thu,  5 Nov 2026 02:47:35 +0800	[thread overview]
Message-ID: <20261104184736.1564283-6-zlang@kernel.org> (raw)
In-Reply-To: <20261104184736.1564283-1-zlang@kernel.org>

The f2fs branch of _require_fanotify_ioerrors() reads the raw
/sys/fs/f2fs/features/fserror path.  Use the new
_get_fs_sysfs_feature_attr helper instead.

Signed-off-by: Zorro Lang <zlang@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 common/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/rc b/common/rc
index 35f5d21e..a8d3c3d8 100644
--- a/common/rc
+++ b/common/rc
@@ -6360,8 +6360,8 @@ _require_fanotify_ioerrors()
 		test -n "$x" && return 0
 		;;
 	f2fs)
-		local feat_file="/sys/fs/f2fs/features/fserror"
-		if [ -f "$feat_file" ] && [ "$(cat "$feat_file")" = "supported" ]; then
+		x="$(_get_fs_sysfs_feature_attr fserror 2>/dev/null)"
+		if [ "$x" = "supported" ];then
 			return 0
 		fi
 		;;
-- 
2.56.0


  parent reply	other threads:[~2026-11-04 18:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 18:47 [PATCH v3 0/6] Refactor *_fs_sysfs_* helpers Zorro Lang
2026-11-04 18:47 ` [PATCH v3 1/6] fstests: rename _*_fs_sysfs_attr helpers to _*_fs_sysfs_dev_attr Zorro Lang
2026-11-04 18:47 ` [PATCH v3 2/6] fstests: consolidate _require_fs_sysfs and _require_fs_sysfs_dev_attr Zorro Lang
2026-11-05  7:50   ` Christoph Hellwig
2026-11-04 18:47 ` [PATCH v3 3/6] common: move btrfs-only sysfs policy helpers out of common/sysfs Zorro Lang
2026-11-04 18:47 ` [PATCH v3 4/6] common/rc: add helpers for /sys/fs/$FSTYP/features/ Zorro Lang
2026-11-04 18:47 ` Zorro Lang [this message]
2026-11-04 18:47 ` [PATCH v3 6/6] fstests: replace btrfs specific helpers with common sysfs helpers Zorro Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104184736.1564283-6-zlang@kernel.org \
    --to=zlang@kernel.org \
    --cc=asj@kernel.org \
    --cc=chao@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.