mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 13:40:54 +07:00
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
This commit is contained in:
commit
c593e89787
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user