linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: cem@kernel.org
To: jack@suse.cz
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir
Date: Tue,  9 Jan 2024 14:46:03 +0100	[thread overview]
Message-ID: <20240109134651.869887-2-cem@kernel.org> (raw)
In-Reply-To: <20240109134651.869887-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


  reply	other threads:[~2024-01-09 13:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 13:46 [PATCH RFC 0/3] Enable tmpfs quotas cem
2024-01-09 13:46 ` cem [this message]
2024-01-09 13:46 ` [PATCH 2/3] Add quotactl_fd() support cem
2024-01-17 18:08   ` Jan Kara
2024-01-24 11:25     ` Carlos Maiolino
2024-01-09 13:46 ` [PATCH 3/3] Enable support for tmpfs quotas cem
2024-01-17 17:59   ` Jan Kara
2024-01-24 11:42     ` Carlos Maiolino
2024-01-24 15:16       ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2024-01-25 16:04 [PATCH 0/3] Add " cem
2024-01-25 16:04 ` [PATCH 1/3] Rename searched_dir->sd_dir to sd_isdir cem
2024-01-26 18:02 [PATCH RESEND 0/3] Add support for tmpfs quotas cem
2024-01-26 18:02 ` [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=20240109134651.869887-2-cem@kernel.org \
    --to=cem@kernel.org \
    --cc=jack@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).