diff mbox

[v2,3/4] btrfs: Rename and export __btrfs_set_prop to be called from running transaction

Message ID 5423AE51.8060701@jp.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Satoru Takeuchi Sept. 25, 2014, 5:55 a.m. UTC
Hi David,

(2014/09/22 21:01), David Sterba wrote:
> On Fri, Sep 19, 2014 at 05:52:17PM +0900, Satoru Takeuchi wrote:
>> @@ -99,7 +99,7 @@ find_prop_handler(const char *name,
>>   	return NULL;
>>   }
>>
>> -static int __btrfs_set_prop(struct btrfs_trans_handle *trans,
>> +int __btrfs_set_prop(struct btrfs_trans_handle *trans,
>
> It's common for static helpers to use the __ prefix, but please drop it
> for an exported function(s).

Sorry for the late reply. Here is the v2 patch.
Please take alook at it.

---
From: Naohiro Aota <naota@elisp.net>

Since "__" prefix means static helper, rename __btrfs_set_prop() to
btrfs_set_prop_trans.

Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
---
changelog
	v1->v2: Reflect the following comment from David.
         https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg37513.html
---
  fs/btrfs/props.c | 6 +++---
  fs/btrfs/props.h | 7 +++++++
  2 files changed, 10 insertions(+), 3 deletions(-)

-- 1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Sterba Sept. 29, 2014, 4:23 p.m. UTC | #1
On Thu, Sep 25, 2014 at 02:55:29PM +0900, Satoru Takeuchi wrote:
> Since "__" prefix means static helper, rename __btrfs_set_prop() to
> btrfs_set_prop_trans.
> 
> Signed-off-by: Naohiro Aota <naota@elisp.net>
> Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

Reviewed-by: David Sterba <dsterba@suse.cz>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index 38efbe1..bba081a 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -99,7 +99,7 @@  find_prop_handler(const char *name,
  	return NULL;
  }
  
-static int __btrfs_set_prop(struct btrfs_trans_handle *trans,
+int btrfs_set_prop_trans(struct btrfs_trans_handle *trans,
  			    struct inode *inode,
  			    const char *name,
  			    const char *value,
@@ -153,7 +153,7 @@  int btrfs_set_prop(struct inode *inode,
  		   size_t value_len,
  		   int flags)
  {
-	return __btrfs_set_prop(NULL, inode, name, value, value_len, flags);
+	return btrfs_set_prop_trans(NULL, inode, name, value, value_len, flags);
  }
  
  static int iterate_object_props(struct btrfs_root *root,
@@ -325,7 +325,7 @@  static int inherit_props(struct btrfs_trans_handle *trans,
  					  num_bytes, BTRFS_RESERVE_NO_FLUSH);
  		if (ret)
  			goto out;
-		ret = __btrfs_set_prop(trans, inode, h->xattr_name,
+		ret = btrfs_set_prop_trans(trans, inode, h->xattr_name,
  				       value, strlen(value), 0);
  		btrfs_block_rsv_release(root, trans->block_rsv, num_bytes);
  		if (ret)
diff --git a/fs/btrfs/props.h b/fs/btrfs/props.h
index 100f188..dcbccf9 100644
--- a/fs/btrfs/props.h
+++ b/fs/btrfs/props.h
@@ -29,6 +29,13 @@  int btrfs_set_prop(struct inode *inode,
  		   size_t value_len,
  		   int flags);
  
+int btrfs_set_prop_trans(struct btrfs_trans_handle *trans,
+			    struct inode *inode,
+			    const char *name,
+			    const char *value,
+			    size_t value_len,
+			    int flags);
+
  int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path);
  
  int btrfs_inode_inherit_props(struct btrfs_trans_handle *trans,