[PATCH] btrfs: simplify kmalloc+copy_from_user to memdup_user

2013-10-14 Thread Geyslan G. Bem
.fr/ Signed-off-by: Geyslan G. Bem --- fs/btrfs/ioctl.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9d46f60..f0e3517 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2727,15 +2727,10 @@ static long

[PATCH] btrfs: simplify kmalloc+copy_from_user to memdup_user

2013-10-14 Thread Geyslan G. Bem
.fr/ Signed-off-by: Geyslan G. Bem --- fs/btrfs/ioctl.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9d46f60..f0e3517 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2727,15 +2727,10 @@ static long

[PATCH v6] btrfs: Fix memory leakage in the tree-log.c

2013-10-11 Thread Geyslan G. Bem
In add_inode_ref() function: Initializes local pointers. Reduces the logical condition with the __add_inode_ref() return value by using only one 'goto out'. Centralizes the exiting, ensuring the freeing of all used memory. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-

[PATCH v5] btrfs: Fix memory leakage in the tree-log.c

2013-10-10 Thread Geyslan G. Bem
In add_inode_ref() function: Initializes local pointers. Reduces the logical condition with the __add_inode_ref() return value by using only one 'goto out'. Centralizes the exiting, ensuring the freeing of all used memory. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-

[PATCH v4] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
When 'dir' is NULL, after calling extref_get_fields(), add_inode_ref() can be returning without freeing the 'name' pointer. Added kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -

[PATCH v3] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/tree-

[PATCH v2] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-

[PATCH] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tr