All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 02/10] btrfs: export btrfs_set_prop
Date: Sat, 20 Apr 2019 19:48:52 +0800	[thread overview]
Message-ID: <20190420114900.15472-3-anand.jain@oracle.com> (raw)
In-Reply-To: <20190420114900.15472-1-anand.jain@oracle.com>

Make btrfs_set_prop() a non static function, so that it can be called
from btrfs_ioctl_setflags(). We need btrfs_set_prop() instead of
btrfs_set_prop_trans() so that we can use the transaction which is
already started in the current thread.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/props.c | 6 +++---
 fs/btrfs/props.h | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index e356dd2a0f73..aedf5a7d69c9 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -72,9 +72,9 @@ int btrfs_validate_prop(const char *name, const char *value, size_t value_len)
 	return handler->validate(value, value_len);
 }
 
-static int btrfs_set_prop(struct btrfs_trans_handle *trans, struct inode *inode,
-			  const char *name, const char *value, size_t value_len,
-			  int flags)
+int btrfs_set_prop(struct btrfs_trans_handle *trans, struct inode *inode,
+		   const char *name, const char *value, size_t value_len,
+		   int flags)
 {
 	const struct prop_handler *handler;
 	int ret;
diff --git a/fs/btrfs/props.h b/fs/btrfs/props.h
index 01d2c1899bc7..30b99348977d 100644
--- a/fs/btrfs/props.h
+++ b/fs/btrfs/props.h
@@ -12,6 +12,9 @@ void __init btrfs_props_init(void);
 
 int btrfs_set_prop_trans(struct inode *inode, const char *name,
 			 const char *value, size_t value_len, int flags);
+int btrfs_set_prop(struct btrfs_trans_handle *trans, struct inode *inode,
+		   const char *name, const char *value, size_t value_len,
+		   int flags);
 int btrfs_validate_prop(const char *name, const char *value, size_t value_len);
 
 int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path);
-- 
2.20.1 (Apple Git-117)


  parent reply	other threads:[~2019-04-20 11:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20 11:48 [PATCH 00/10] cleanup btrfs_ioctl_setflags and btrfs_set_prop Anand Jain
2019-04-20 11:48 ` [PATCH 01/10] btrfs: refactor btrfs_set_props to validate externally Anand Jain
2019-04-20 11:48 ` Anand Jain [this message]
2019-04-20 11:48 ` [PATCH 03/10] btrfs: start transaction in btrfs_ioctl_setflags() Anand Jain
2019-04-20 11:48 ` [PATCH 04/10] btrfs: drop useless inode i_flags copy and restore Anand Jain
2019-04-20 11:48 ` [PATCH 05/10] btrfs: make a local copy of btrfs_inode flags before update Anand Jain
2019-04-20 11:48 ` [PATCH 06/10] btrfs: drop old_fsflags in btrfs_ioctl_setflags Anand Jain
2019-04-20 11:48 ` [PATCH 07/10] btrfs: drop local copy of inode i_mode Anand Jain
2019-04-20 11:48 ` [PATCH 08/10] btrfs: start transaction in xattr_handler_set_prop Anand Jain
2019-04-20 11:48 ` [PATCH 09/10] btrfs: delete unused function btrfs_set_prop_trans Anand Jain
2019-04-20 11:49 ` [PATCH 10/10] btrfs: btrfs_set_prop trans is never null Anand Jain
2019-04-24 15:14 ` [PATCH 00/10] cleanup btrfs_ioctl_setflags and btrfs_set_prop David Sterba
2019-04-26  6:20   ` Anand Jain
2019-04-26 11:49     ` 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=20190420114900.15472-3-anand.jain@oracle.com \
    --to=anand.jain@oracle.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.