All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 3/7] btrfs: rename check_flags to reflect which flags it touches
Date: Fri, 20 Apr 2018 19:02:36 +0200	[thread overview]
Message-ID: <0500fb0c95262dcced06607fe24941b26007890b.1524242295.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1524242295.git.dsterba@suse.com>

The FS_*_FL flags cannot be easily identified by a prefix but we still
need to recognize them so the 'fsflags' should be closer to the naming
scheme but again the 'fs' part sounds like it's a filesystem flag. I
don't have a better idea for now.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/ioctl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index b2c26beffd82..953473f2a136 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -168,7 +168,8 @@ static int btrfs_ioctl_getflags(struct file *file, void __user *arg)
 	return 0;
 }
 
-static int check_flags(unsigned int flags)
+/* Check if @flags are a supported and valid set of FS_*_FL flags */
+static int check_fsflags(unsigned int flags)
 {
 	if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \
 		      FS_NOATIME_FL | FS_NODUMP_FL | \
@@ -205,7 +206,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
 	if (copy_from_user(&flags, arg, sizeof(flags)))
 		return -EFAULT;
 
-	ret = check_flags(flags);
+	ret = check_fsflags(flags);
 	if (ret)
 		return ret;
 
-- 
2.16.2


  parent reply	other threads:[~2018-04-20 17:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 17:02 [PATCH 0/7] Add ioctl to support extended inode flags David Sterba
2018-04-20 17:02 ` [PATCH 1/7] btrfs: rename btrfs_update_iflags to reflect which flags it touches David Sterba
2018-04-20 17:02 ` [PATCH 2/7] btrfs: rename btrfs_mask_flags " David Sterba
2018-04-20 17:02 ` David Sterba [this message]
2018-04-20 17:02 ` [PATCH 4/7] btrfs: rename btrfs_flags_to_ioctl " David Sterba
2018-04-23  2:37   ` Misono Tomohiro
2018-04-23 13:11     ` David Sterba
2018-04-20 17:02 ` [PATCH 5/7] btrfs: add helpers for FS_XFLAG_* conversion David Sterba
2018-04-20 17:02 ` [PATCH 6/7] btrfs: add FS_IOC_FSGETXATTR ioctl David Sterba
2018-04-20 17:02 ` [PATCH 7/7] btrfs: add FS_IOC_FSSETXATTR ioctl David Sterba
2018-04-23  2:42   ` Misono Tomohiro
2018-04-23 13:14     ` David Sterba

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=0500fb0c95262dcced06607fe24941b26007890b.1524242295.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@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.