diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-07 15:12:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-07 15:12:18 -0700 |
commit | c593e8978722f7f4a12932733cfeed6c0c74fbaa (patch) | |
tree | 364ad0542f0208b161ad848281273354e6fc037d /fs | |
parent | 052e5c7e28cc22017f9ad3f67026f911fdfc2edc (diff) | |
parent | 01a9a8a9e20012f5676ec9cd16b6aed08b267066 (diff) | |
download | op-kernel-dev-c593e8978722f7f4a12932733cfeed6c0c74fbaa.zip op-kernel-dev-c593e8978722f7f4a12932733cfeed6c0c74fbaa.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/send.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index fd38b50..484aaca 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -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; |