All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: btrfs: fixes a pass by reference issue in send.c
@ 2016-02-01 11:53 Ben Marsh
  2016-02-01 12:05 ` Filipe Manana
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Marsh @ 2016-02-01 11:53 UTC (permalink / raw)
  To: clm, jbacik, dsterba; +Cc: linux-btrfs

This patch fixes a pointer issue from passing a struct as a parameter
to the function btrfs_root_dec_send_in_progress.

Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
---
 fs/btrfs/send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 63a6152..47ee63e 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -5911,7 +5911,7 @@ commit_trans:
 	return btrfs_commit_transaction(trans, sctx->send_root);
 }
 
-static void btrfs_root_dec_send_in_progress(struct btrfs_root* root)
+static void btrfs_root_dec_send_in_progress(struct btrfs_root *root)
 {
 	spin_lock(&root->root_item_lock);
 	root->send_in_progress--;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs: btrfs: fixes a pass by reference issue in send.c
  2016-02-01 11:53 [PATCH] fs: btrfs: fixes a pass by reference issue in send.c Ben Marsh
@ 2016-02-01 12:05 ` Filipe Manana
  0 siblings, 0 replies; 2+ messages in thread
From: Filipe Manana @ 2016-02-01 12:05 UTC (permalink / raw)
  To: Ben Marsh
  Cc: Chris Mason, Josef Bacik, David Sterba,
	linux-btrfs@vger.kernel.org

On Mon, Feb 1, 2016 at 11:53 AM, Ben Marsh <bmarsh94@gmail.com> wrote:
> This patch fixes a pointer issue from passing a struct as a parameter
> to the function btrfs_root_dec_send_in_progress.
>
> Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
> ---
>  fs/btrfs/send.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
> index 63a6152..47ee63e 100644
> --- a/fs/btrfs/send.c
> +++ b/fs/btrfs/send.c
> @@ -5911,7 +5911,7 @@ commit_trans:
>         return btrfs_commit_transaction(trans, sctx->send_root);
>  }
>
> -static void btrfs_root_dec_send_in_progress(struct btrfs_root* root)
> +static void btrfs_root_dec_send_in_progress(struct btrfs_root *root)

It's a white space change. Both forms are equivalent and pass the root
by reference.
IOW, you aren't fixing any problem.

>  {
>         spin_lock(&root->root_item_lock);
>         root->send_in_progress--;
> --
> 1.9.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



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-01 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 11:53 [PATCH] fs: btrfs: fixes a pass by reference issue in send.c Ben Marsh
2016-02-01 12:05 ` Filipe Manana

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.