From: cem@kernel.org
To: jack@suze.cz
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir
Date: Thu, 25 Jan 2024 17:04:33 +0100 [thread overview]
Message-ID: <20240125160447.1136023-2-cem@kernel.org> (raw)
In-Reply-To: <20240125160447.1136023-1-cem@kernel.org>
From: Carlos Maiolino <cem@kernel.org>
The field holds information if we are searching a directory mountpoint or a
device, rename the field to something more meaningful.
We could switch it to bool, but it seems pointless to include a whole header
just for it, so keep the int type.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
quotasys.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/quotasys.c b/quotasys.c
index 3f50e32..9af9932 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -1223,7 +1223,7 @@ int kern_quota_on(struct mount_entry *mnt, int type, int fmt)
*/
struct searched_dir {
- int sd_dir; /* Is searched dir mountpoint or in fact device? */
+ int sd_isdir; /* Is searched dir mountpoint or in fact device? */
dev_t sd_dev; /* Device mountpoint lies on */
ino_t sd_ino; /* Inode number of mountpoint */
const char *sd_name; /* Name of given dir/device */
@@ -1454,7 +1454,7 @@ static int process_dirs(int dcnt, char **dirs, int flags)
errstr(_("Cannot stat() given mountpoint %s: %s\nSkipping...\n"), dirs[i], strerror(errno));
continue;
}
- check_dirs[check_dirs_cnt].sd_dir = S_ISDIR(st.st_mode);
+ check_dirs[check_dirs_cnt].sd_isdir = S_ISDIR(st.st_mode);
if (S_ISDIR(st.st_mode)) {
const char *realmnt = dirs[i];
@@ -1538,7 +1538,7 @@ restart:
return 0;
sd = check_dirs + act_checked;
for (i = 0; i < mnt_entries_cnt; i++) {
- if (sd->sd_dir) {
+ if (sd->sd_isdir) {
if (sd->sd_dev == mnt_entries[i].me_dev && sd->sd_ino == mnt_entries[i].me_ino)
break;
}
--
2.43.0
next prev parent reply other threads:[~2024-01-25 16:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 16:04 [PATCH 0/3] Add support for tmpfs quotas cem
2024-01-25 16:04 ` cem [this message]
2024-01-25 16:04 ` [PATCH 2/3] Add quotactl_fd() support cem
2024-01-25 16:04 ` [PATCH 3/3] Enable support for tmpfs quotas cem
-- strict thread matches above, loose matches on Subject: below --
2024-01-26 18:02 [PATCH RESEND 0/3] Add " cem
2024-01-26 18:02 ` [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir cem
2024-01-09 13:46 [PATCH RFC 0/3] Enable tmpfs quotas cem
2024-01-09 13:46 ` [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir cem
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=20240125160447.1136023-2-cem@kernel.org \
--to=cem@kernel.org \
--cc=jack@suze.cz \
--cc=linux-fsdevel@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.