aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 807a463fd5ed..1ed4be2a7654 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1892,7 +1892,7 @@ int remove_suid(struct dentry *dentry)
1892EXPORT_SYMBOL(remove_suid); 1892EXPORT_SYMBOL(remove_suid);
1893 1893
1894size_t 1894size_t
1895__filemap_copy_from_user_iovec(char *vaddr, 1895__filemap_copy_from_user_iovec_inatomic(char *vaddr,
1896 const struct iovec *iov, size_t base, size_t bytes) 1896 const struct iovec *iov, size_t base, size_t bytes)
1897{ 1897{
1898 size_t copied = 0, left = 0; 1898 size_t copied = 0, left = 0;
@@ -1908,12 +1908,8 @@ __filemap_copy_from_user_iovec(char *vaddr,
1908 vaddr += copy; 1908 vaddr += copy;
1909 iov++; 1909 iov++;
1910 1910
1911 if (unlikely(left)) { 1911 if (unlikely(left))
1912 /* zero the rest of the target like __copy_from_user */
1913 if (bytes)
1914 memset(vaddr, 0, bytes);
1915 break; 1912 break;
1916 }
1917 } 1913 }
1918 return copied - left; 1914 return copied - left;
1919} 1915}