[PATCH] btrfs: relocation: set trans to be NULL after free

2018-11-23 Thread Pan Bian
. The patch assigns NULL to trans after trans is released so that it will not be accessed. Fixes: 0647bf564f1("Btrfs: improve forever loop when doing balance relocation") Signed-off-by: Pan Bian --- fs/btrfs/relocation.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/relo

[PATCH 1/1] btrfs: fix improper return value

2016-12-03 Thread Pan Bian
-off-by: Pan Bian --- fs/btrfs/uuid-tree.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/btrfs/uuid-tree.c b/fs/btrfs/uuid-tree.c index 7fc89e4..83bb2f2 100644 --- a/fs/btrfs/uuid-tree.c +++ b/fs/btrfs/uuid-tree.c @@ -351,7 +351,5 @@ int btrfs_uuid_tree_iterate(struct

[PATCH 1/1] btrfs: volumes: fix improper return value

2016-12-03 Thread Pan Bian
Variable ret takes the errno on failures. However, it directly returns 0. It may be better to return "ret". Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188741 Signed-off-by: Pan Bian --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/1] btrfs: fix improper return value

2016-12-03 Thread Pan Bian
In function btrfs_uuid_tree_iterate(), errno is assigned to variable ret on errors. However, it directly returns 0. It may be better to return ret. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731 Signed-off-by: Pan Bian --- fs/btrfs/uuid-tree.c | 2 +- 1 file changed, 1 insertion