Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mason/linux-btrfs

Pull btrfs fix from Chris Mason:
 "I had this in my 3.16 merge window queue, but it is small and obvious
  enough for 3.15.  I cherry-picked and retested against current rc8"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: send, fix corrupted path strings for long paths
  • Loading branch information
torvalds committed Jun 7, 2014
2 parents 052e5c7 + 01a9a8a commit c593e89
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,13 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
/*
* First time the inline_buf does not suffice
*/
if (p->buf == p->inline_buf)
if (p->buf == p->inline_buf) {
tmp_buf = kmalloc(len, GFP_NOFS);
else
if (tmp_buf)
memcpy(tmp_buf, p->buf, old_buf_len);
} else {
tmp_buf = krealloc(p->buf, len, GFP_NOFS);
}
if (!tmp_buf)
return -ENOMEM;
p->buf = tmp_buf;
Expand Down

0 comments on commit c593e89

Please sign in to comment.