diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-14 19:03:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-14 19:03:57 -0500 |
commit | 63f729cb4aa9a224cfd6bb35eab6b4556c29115d (patch) | |
tree | 4bfd85dc758d93d82d84a591cb9c61f4796f5cb8 /fs/nfs | |
parent | 10a0c0f0595b20efa127a1816670c64a3d0e4965 (diff) | |
parent | e8ecde25f5e08f89b61d86c32bbb56b405e90c32 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fix from Al Viro:
"Don't put symlink bodies in pagecache into highmem"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
Make sure that highmem pages are not added to symlink page cache
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ce5a21861074..8a0530921685 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1894,15 +1894,14 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
1894 | attr.ia_mode = S_IFLNK | S_IRWXUGO; | 1894 | attr.ia_mode = S_IFLNK | S_IRWXUGO; |
1895 | attr.ia_valid = ATTR_MODE; | 1895 | attr.ia_valid = ATTR_MODE; |
1896 | 1896 | ||
1897 | page = alloc_page(GFP_HIGHUSER); | 1897 | page = alloc_page(GFP_USER); |
1898 | if (!page) | 1898 | if (!page) |
1899 | return -ENOMEM; | 1899 | return -ENOMEM; |
1900 | 1900 | ||
1901 | kaddr = kmap_atomic(page); | 1901 | kaddr = page_address(page); |
1902 | memcpy(kaddr, symname, pathlen); | 1902 | memcpy(kaddr, symname, pathlen); |
1903 | if (pathlen < PAGE_SIZE) | 1903 | if (pathlen < PAGE_SIZE) |
1904 | memset(kaddr + pathlen, 0, PAGE_SIZE - pathlen); | 1904 | memset(kaddr + pathlen, 0, PAGE_SIZE - pathlen); |
1905 | kunmap_atomic(kaddr); | ||
1906 | 1905 | ||
1907 | trace_nfs_symlink_enter(dir, dentry); | 1906 | trace_nfs_symlink_enter(dir, dentry); |
1908 | error = NFS_PROTO(dir)->symlink(dir, dentry, page, pathlen, &attr); | 1907 | error = NFS_PROTO(dir)->symlink(dir, dentry, page, pathlen, &attr); |