diff mbox

Btrfs: use vfree instead of kfree

Message ID 1347642309-29242-1-git-send-email-jbacik@fusionio.com (mailing list archive)
State New, archived
Headers show

Commit Message

Josef Bacik Sept. 14, 2012, 5:05 p.m. UTC
We are vmalloc()'ing the fspath now so we should be vfree'ing it and not
kfreeing it.  Thanks,

Reported-by: Dave Sterba <dave@jikos.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
 fs/btrfs/backref.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Sterba Sept. 16, 2012, 6:12 p.m. UTC | #1
On Fri, Sep 14, 2012 at 01:05:09PM -0400, Josef Bacik wrote:
> We are vmalloc()'ing the fspath now so we should be vfree'ing it and not
> kfreeing it.  Thanks,
> 
> Reported-by: Dave Sterba <dave@jikos.cz>
> Signed-off-by: Josef Bacik <jbacik@fusionio.com>

IMO better to fold this change into the patch that introduced it, as
it's not merged anywhere else than btrfs-next:

  [PATCH v2 6/6] Btrfs: use larger limit for translation of logical to inode
  From: Liu Bo <bo.li.liu@oracle.com>

plus add the missing #include <linux/vmalloc.h> that Fengguang Wu
encountered.


david
--
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/backref.c b/fs/btrfs/backref.c
index fb72931..395d912 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1634,6 +1634,6 @@  void free_ipath(struct inode_fs_paths *ipath)
 {
 	if (!ipath)
 		return;
-	kfree(ipath->fspath);
+	vfree(ipath->fspath);
 	kfree(ipath);
 }