summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 16:03:57 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-14 16:03:57 -0800
commit63f729cb4aa9a224cfd6bb35eab6b4556c29115d (patch)
tree4bfd85dc758d93d82d84a591cb9c61f4796f5cb8 /fs
parent10a0c0f0595b20efa127a1816670c64a3d0e4965 (diff)
parente8ecde25f5e08f89b61d86c32bbb56b405e90c32 (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')
-rw-r--r--fs/nfs/dir.c5
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)
attr.ia_mode = S_IFLNK | S_IRWXUGO;
attr.ia_valid = ATTR_MODE;
- page = alloc_page(GFP_HIGHUSER);
+ page = alloc_page(GFP_USER);
if (!page)
return -ENOMEM;
- kaddr = kmap_atomic(page);
+ kaddr = page_address(page);
memcpy(kaddr, symname, pathlen);
if (pathlen < PAGE_SIZE)
memset(kaddr + pathlen, 0, PAGE_SIZE - pathlen);
- kunmap_atomic(kaddr);
trace_nfs_symlink_enter(dir, dentry);
error = NFS_PROTO(dir)->symlink(dir, dentry, page, pathlen, &attr);