From: Thorsten Blum <blum@kernel.org>
To: David Sterba <dsterba@suse.com>, Chris Mason <mason@kernel.org>,
Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
Richard Weinberger <richard@nod.at>,
Zhihao Cheng <chengzhihao1@huawei.com>,
Eric Biggers <ebiggers@kernel.org>,
"Theodore Y. Ts'o" <tytso@mit.edu>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org,
Thorsten Blum <blum@kernel.org>
Subject: [PATCH 2/4] btrfs: Use FSTR() for the "default" name
Date: Wed, 18 Nov 2026 01:28:48 +0100 [thread overview]
Message-ID: <20261118002845.574426-8-blum@kernel.org> (raw)
In-Reply-To: <20261118002845.574426-6-blum@kernel.org>
Replace FSTR_INIT() with FSTR() and drop the hard-coded length argument.
Use FSTR() directly and remove the temporary name variables.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
fs/btrfs/inode.c | 3 +--
fs/btrfs/ioctl.c | 3 +--
fs/btrfs/super.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index abaa33471456..1ffdcdd16bb5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4640,7 +4640,6 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
BTRFS_PATH_AUTO_FREE(path);
struct btrfs_dir_item *di;
struct btrfs_key key;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 dir_id;
int ret;
@@ -4651,7 +4650,7 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
/* Make sure this root isn't set as the default subvol */
dir_id = btrfs_super_root_dir(fs_info->super_copy);
di = btrfs_lookup_dir_item(NULL, fs_info->tree_root, path,
- dir_id, &name, 0);
+ dir_id, &FSTR("default"), 0);
if (!IS_ERR_OR_NULL(di)) {
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
if (key.objectid == btrfs_root_id(root)) {
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6ba883db107b..6c371621f014 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2825,7 +2825,6 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
struct btrfs_trans_handle *trans;
struct btrfs_path *path = NULL;
struct btrfs_disk_key disk_key;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 objectid = 0;
u64 dir_id;
int ret;
@@ -2869,7 +2868,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
dir_id = btrfs_super_root_dir(fs_info->super_copy);
di = btrfs_lookup_dir_item(trans, fs_info->tree_root, path,
- dir_id, &name, 1);
+ dir_id, &FSTR("default"), 1);
if (IS_ERR_OR_NULL(di)) {
btrfs_release_path(path);
btrfs_end_transaction(trans);
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b424cc836bd4..0b8b808872c7 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -911,7 +911,6 @@ static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objec
struct btrfs_dir_item *di;
BTRFS_PATH_AUTO_FREE(path);
struct btrfs_key location;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 dir_id;
path = btrfs_alloc_path();
@@ -924,7 +923,7 @@ static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objec
* to mount.
*/
dir_id = btrfs_super_root_dir(fs_info->super_copy);
- di = btrfs_lookup_dir_item(NULL, root, path, dir_id, &name, 0);
+ di = btrfs_lookup_dir_item(NULL, root, path, dir_id, &FSTR("default"), 0);
if (IS_ERR(di)) {
return PTR_ERR(di);
}
WARNING: multiple messages have this Message-ID (diff)
From: Thorsten Blum via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: David Sterba <dsterba@suse.com>, Chris Mason <mason@kernel.org>,
Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
Richard Weinberger <richard@nod.at>,
Zhihao Cheng <chengzhihao1@huawei.com>,
Eric Biggers <ebiggers@kernel.org>,
"Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Thorsten Blum <blum@kernel.org>,
linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-btrfs@vger.kernel.org
Subject: [f2fs-dev] [PATCH 2/4] btrfs: Use FSTR() for the "default" name
Date: Wed, 18 Nov 2026 01:28:48 +0100 [thread overview]
Message-ID: <20261118002845.574426-8-blum@kernel.org> (raw)
In-Reply-To: <20261118002845.574426-6-blum@kernel.org>
Replace FSTR_INIT() with FSTR() and drop the hard-coded length argument.
Use FSTR() directly and remove the temporary name variables.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
fs/btrfs/inode.c | 3 +--
fs/btrfs/ioctl.c | 3 +--
fs/btrfs/super.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index abaa33471456..1ffdcdd16bb5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4640,7 +4640,6 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
BTRFS_PATH_AUTO_FREE(path);
struct btrfs_dir_item *di;
struct btrfs_key key;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 dir_id;
int ret;
@@ -4651,7 +4650,7 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
/* Make sure this root isn't set as the default subvol */
dir_id = btrfs_super_root_dir(fs_info->super_copy);
di = btrfs_lookup_dir_item(NULL, fs_info->tree_root, path,
- dir_id, &name, 0);
+ dir_id, &FSTR("default"), 0);
if (!IS_ERR_OR_NULL(di)) {
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
if (key.objectid == btrfs_root_id(root)) {
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6ba883db107b..6c371621f014 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2825,7 +2825,6 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
struct btrfs_trans_handle *trans;
struct btrfs_path *path = NULL;
struct btrfs_disk_key disk_key;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 objectid = 0;
u64 dir_id;
int ret;
@@ -2869,7 +2868,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
dir_id = btrfs_super_root_dir(fs_info->super_copy);
di = btrfs_lookup_dir_item(trans, fs_info->tree_root, path,
- dir_id, &name, 1);
+ dir_id, &FSTR("default"), 1);
if (IS_ERR_OR_NULL(di)) {
btrfs_release_path(path);
btrfs_end_transaction(trans);
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b424cc836bd4..0b8b808872c7 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -911,7 +911,6 @@ static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objec
struct btrfs_dir_item *di;
BTRFS_PATH_AUTO_FREE(path);
struct btrfs_key location;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 dir_id;
path = btrfs_alloc_path();
@@ -924,7 +923,7 @@ static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objec
* to mount.
*/
dir_id = btrfs_super_root_dir(fs_info->super_copy);
- di = btrfs_lookup_dir_item(NULL, root, path, dir_id, &name, 0);
+ di = btrfs_lookup_dir_item(NULL, root, path, dir_id, &FSTR("default"), 0);
if (IS_ERR(di)) {
return PTR_ERR(di);
}
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Thorsten Blum <blum@kernel.org>
To: David Sterba <dsterba@suse.com>, Chris Mason <mason@kernel.org>,
Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
Richard Weinberger <richard@nod.at>,
Zhihao Cheng <chengzhihao1@huawei.com>,
Eric Biggers <ebiggers@kernel.org>,
"Theodore Y. Ts'o" <tytso@mit.edu>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org,
Thorsten Blum <blum@kernel.org>
Subject: [PATCH 2/4] btrfs: Use FSTR() for the "default" name
Date: Wed, 18 Nov 2026 01:28:48 +0100 [thread overview]
Message-ID: <20261118002845.574426-8-blum@kernel.org> (raw)
In-Reply-To: <20261118002845.574426-6-blum@kernel.org>
Replace FSTR_INIT() with FSTR() and drop the hard-coded length argument.
Use FSTR() directly and remove the temporary name variables.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
fs/btrfs/inode.c | 3 +--
fs/btrfs/ioctl.c | 3 +--
fs/btrfs/super.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index abaa33471456..1ffdcdd16bb5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4640,7 +4640,6 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
BTRFS_PATH_AUTO_FREE(path);
struct btrfs_dir_item *di;
struct btrfs_key key;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 dir_id;
int ret;
@@ -4651,7 +4650,7 @@ static noinline int may_destroy_subvol(struct btrfs_root *root)
/* Make sure this root isn't set as the default subvol */
dir_id = btrfs_super_root_dir(fs_info->super_copy);
di = btrfs_lookup_dir_item(NULL, fs_info->tree_root, path,
- dir_id, &name, 0);
+ dir_id, &FSTR("default"), 0);
if (!IS_ERR_OR_NULL(di)) {
btrfs_dir_item_key_to_cpu(path->nodes[0], di, &key);
if (key.objectid == btrfs_root_id(root)) {
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6ba883db107b..6c371621f014 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2825,7 +2825,6 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
struct btrfs_trans_handle *trans;
struct btrfs_path *path = NULL;
struct btrfs_disk_key disk_key;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 objectid = 0;
u64 dir_id;
int ret;
@@ -2869,7 +2868,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
dir_id = btrfs_super_root_dir(fs_info->super_copy);
di = btrfs_lookup_dir_item(trans, fs_info->tree_root, path,
- dir_id, &name, 1);
+ dir_id, &FSTR("default"), 1);
if (IS_ERR_OR_NULL(di)) {
btrfs_release_path(path);
btrfs_end_transaction(trans);
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b424cc836bd4..0b8b808872c7 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -911,7 +911,6 @@ static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objec
struct btrfs_dir_item *di;
BTRFS_PATH_AUTO_FREE(path);
struct btrfs_key location;
- struct fscrypt_str name = FSTR_INIT("default", 7);
u64 dir_id;
path = btrfs_alloc_path();
@@ -924,7 +923,7 @@ static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objec
* to mount.
*/
dir_id = btrfs_super_root_dir(fs_info->super_copy);
- di = btrfs_lookup_dir_item(NULL, root, path, dir_id, &name, 0);
+ di = btrfs_lookup_dir_item(NULL, root, path, dir_id, &FSTR("default"), 0);
if (IS_ERR(di)) {
return PTR_ERR(di);
}
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2026-11-18 0:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 0:28 [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers Thorsten Blum
2026-11-18 0:28 ` Thorsten Blum
2026-11-18 0:28 ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18 0:28 ` [PATCH 1/4] fscrypt: Add FSTR() helper macro Thorsten Blum
2026-11-18 0:28 ` Thorsten Blum
2026-11-18 0:28 ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18 0:28 ` Thorsten Blum [this message]
2026-11-18 0:28 ` [PATCH 2/4] btrfs: Use FSTR() for the "default" name Thorsten Blum
2026-11-18 0:28 ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18 0:28 ` [PATCH 3/4] f2fs: Use FSTR() in f2fs_do_make_empty_dir() Thorsten Blum
2026-11-18 0:28 ` Thorsten Blum
2026-11-18 0:28 ` [f2fs-dev] " Thorsten Blum via Linux-f2fs-devel
2026-11-18 0:28 ` [f2fs-dev] [PATCH 4/4] ubifs: Use FSTR() in ubifs_xattr_{set, get, remove}() Thorsten Blum via Linux-f2fs-devel
2026-11-18 0:28 ` [PATCH 4/4] ubifs: Use FSTR() in ubifs_xattr_{set,get,remove}() Thorsten Blum
2026-11-18 0:28 ` Thorsten Blum
2026-11-18 0:34 ` sashiko-bot
2026-11-18 0:34 ` sashiko-bot
2026-11-18 0:35 ` sashiko-bot
2026-11-18 0:35 ` sashiko-bot
2026-11-18 5:01 ` [PATCH 0/4] fscrypt: Add FSTR() helper macro and convert initializers Eric Biggers
2026-11-18 5:01 ` Eric Biggers
2026-11-18 5:01 ` [f2fs-dev] " Eric Biggers via Linux-f2fs-devel
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=20261118002845.574426-8-blum@kernel.org \
--to=blum@kernel.org \
--cc=chao@kernel.org \
--cc=chengzhihao1@huawei.com \
--cc=dsterba@suse.com \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mason@kernel.org \
--cc=richard@nod.at \
--cc=tytso@mit.edu \
/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.