aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fd252fff4c66..2bb08862a4f6 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1757,11 +1757,10 @@ static noinline int btrfs_search_path_in_tree(struct btrfs_fs_info *info,
1757 key.objectid = key.offset; 1757 key.objectid = key.offset;
1758 key.offset = (u64)-1; 1758 key.offset = (u64)-1;
1759 dirid = key.objectid; 1759 dirid = key.objectid;
1760
1761 } 1760 }
1762 if (ptr < name) 1761 if (ptr < name)
1763 goto out; 1762 goto out;
1764 memcpy(name, ptr, total_len); 1763 memmove(name, ptr, total_len);
1765 name[total_len]='\0'; 1764 name[total_len]='\0';
1766 ret = 0; 1765 ret = 0;
1767out: 1766out: