mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
don't put symlink bodies in pagecache into highmem
kmap() in page_follow_link_light() needed to go - allowing to hold an arbitrary number of kmaps for long is a great way to deadlocking the system. new helper (inode_nohighmem(inode)) needs to be used for pagecache symlinks inodes; done for all in-tree cases. page_follow_link_light() instrumented to yell about anything missed. Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
aa80deab33
commit
21fc61c73c
57 changed files with 81 additions and 46 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <linux/coda.h>
|
||||
#include <linux/coda_psdev.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include "coda_linux.h"
|
||||
|
||||
static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2)
|
||||
|
|
@ -35,6 +36,7 @@ static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr)
|
|||
inode->i_fop = &coda_dir_operations;
|
||||
} else if (S_ISLNK(inode->i_mode)) {
|
||||
inode->i_op = &coda_symlink_inode_operations;
|
||||
inode_nohighmem(inode);
|
||||
inode->i_data.a_ops = &coda_symlink_aops;
|
||||
inode->i_mapping = &inode->i_data;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ static int coda_symlink_filler(struct file *file, struct page *page)
|
|||
int error;
|
||||
struct coda_inode_info *cii;
|
||||
unsigned int len = PAGE_SIZE;
|
||||
char *p = kmap(page);
|
||||
char *p = page_address(page);
|
||||
|
||||
cii = ITOC(inode);
|
||||
|
||||
|
|
@ -34,13 +34,11 @@ static int coda_symlink_filler(struct file *file, struct page *page)
|
|||
if (error)
|
||||
goto fail;
|
||||
SetPageUptodate(page);
|
||||
kunmap(page);
|
||||
unlock_page(page);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
SetPageError(page);
|
||||
kunmap(page);
|
||||
unlock_page(page);
|
||||
return error;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue