From: DaeMyung Kang <charsyam@gmail.com>
To: linkinjeon@kernel.org, hyc.lee@gmail.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
DaeMyung Kang <charsyam@gmail.com>
Subject: [PATCH 2/3] ntfs: use $Q when marking quotas out of date
Date: Tue, 12 May 2026 01:06:24 +0900 [thread overview]
Message-ID: <20260511160626.1268612-3-charsyam@gmail.com> (raw)
In-Reply-To: <20260511160626.1268612-1-charsyam@gmail.com>
ntfs_mark_quotas_out_of_date() operates on vol->quota_q_ino, which is the
$Quota/$Q index inode opened by load_and_init_quota(). However, it creates
the index context with the $I30 name.
That asks the $Quota file for an $INDEX_ROOT named $I30 and fails before
the quota defaults entry can be looked up. Use the $Q index name when
marking quotas out of date.
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
---
fs/ntfs/quota.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ntfs/quota.c b/fs/ntfs/quota.c
index b443243..7086951 100644
--- a/fs/ntfs/quota.c
+++ b/fs/ntfs/quota.c
@@ -21,6 +21,7 @@ bool ntfs_mark_quotas_out_of_date(struct ntfs_volume *vol)
{
struct ntfs_index_context *ictx;
struct quota_control_entry *qce;
+ static __le16 Q[3] = { cpu_to_le16('$'), cpu_to_le16('Q'), 0 };
const __le32 qid = QUOTA_DEFAULTS_ID;
int err;
@@ -32,7 +33,7 @@ bool ntfs_mark_quotas_out_of_date(struct ntfs_volume *vol)
return false;
}
inode_lock(vol->quota_q_ino);
- ictx = ntfs_index_ctx_get(NTFS_I(vol->quota_q_ino), I30, 4);
+ ictx = ntfs_index_ctx_get(NTFS_I(vol->quota_q_ino), Q, 2);
if (!ictx) {
ntfs_error(vol->sb, "Failed to get index context.");
goto err_out;
--
2.43.0
next prev parent reply other threads:[~2026-05-11 16:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 16:06 [PATCH 0/3] ntfs: fix quota out-of-date marking DaeMyung Kang
2026-05-11 16:06 ` [PATCH 1/3] ntfs: return view index entry data from lookup DaeMyung Kang
2026-05-11 16:06 ` DaeMyung Kang [this message]
2026-05-11 16:06 ` [PATCH 3/3] ntfs: mark quotas out of date on initial rw mount DaeMyung Kang
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=20260511160626.1268612-3-charsyam@gmail.com \
--to=charsyam@gmail.com \
--cc=hyc.lee@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox