Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c593e897 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 052e5c7e 01a9a8a9
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;