diff mbox

[1/3] btrfs: btrfs_inode_log_parent should use defined inode_only values.

Message ID 20171120202449.22947-2-enadolski@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Edmund Nadolski Nov. 20, 2017, 8:24 p.m. UTC
Replace hardcoded numeric argument values for inode_only with the
constants defined for that use.

Signed-off-by: Edmund Nadolski <enadolski@suse.com>
---
 fs/btrfs/tree-log.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Nikolay Borisov Nov. 21, 2017, 8:44 a.m. UTC | #1
On 20.11.2017 22:24, Edmund Nadolski wrote:
> Replace hardcoded numeric argument values for inode_only with the
> constants defined for that use.
> 
> Signed-off-by: Edmund Nadolski <enadolski@suse.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  fs/btrfs/tree-log.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
> index 1f79405..95cff91 100644
> --- a/fs/btrfs/tree-log.c
> +++ b/fs/btrfs/tree-log.c
> @@ -5403,11 +5403,10 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
>  				  struct dentry *parent,
>  				  const loff_t start,
>  				  const loff_t end,
> -				  int exists_only,
> +				  int inode_only,
>  				  struct btrfs_log_ctx *ctx)
>  {
>  	struct btrfs_fs_info *fs_info = root->fs_info;
> -	int inode_only = exists_only ? LOG_INODE_EXISTS : LOG_INODE_ALL;
>  	struct super_block *sb;
>  	struct dentry *old_parent = NULL;
>  	int ret = 0;
> @@ -5573,7 +5572,7 @@ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
>  	int ret;
>  
>  	ret = btrfs_log_inode_parent(trans, root, BTRFS_I(d_inode(dentry)),
> -			parent, start, end, 0, ctx);
> +			parent, start, end, LOG_INODE_ALL, ctx);
>  	dput(parent);
>  
>  	return ret;
> @@ -5836,6 +5835,6 @@ int btrfs_log_new_name(struct btrfs_trans_handle *trans,
>  		return 0;
>  
>  	return btrfs_log_inode_parent(trans, root, inode, parent, 0,
> -				      LLONG_MAX, 1, NULL);
> +				      LLONG_MAX, LOG_INODE_EXISTS, NULL);
>  }
>  
> 
--
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/tree-log.c b/fs/btrfs/tree-log.c
index 1f79405..95cff91 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -5403,11 +5403,10 @@  static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans,
 				  struct dentry *parent,
 				  const loff_t start,
 				  const loff_t end,
-				  int exists_only,
+				  int inode_only,
 				  struct btrfs_log_ctx *ctx)
 {
 	struct btrfs_fs_info *fs_info = root->fs_info;
-	int inode_only = exists_only ? LOG_INODE_EXISTS : LOG_INODE_ALL;
 	struct super_block *sb;
 	struct dentry *old_parent = NULL;
 	int ret = 0;
@@ -5573,7 +5572,7 @@  int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
 	int ret;
 
 	ret = btrfs_log_inode_parent(trans, root, BTRFS_I(d_inode(dentry)),
-			parent, start, end, 0, ctx);
+			parent, start, end, LOG_INODE_ALL, ctx);
 	dput(parent);
 
 	return ret;
@@ -5836,6 +5835,6 @@  int btrfs_log_new_name(struct btrfs_trans_handle *trans,
 		return 0;
 
 	return btrfs_log_inode_parent(trans, root, inode, parent, 0,
-				      LLONG_MAX, 1, NULL);
+				      LLONG_MAX, LOG_INODE_EXISTS, NULL);
 }