提交 39cf8a13 编写于 作者: C Chuck Lever 提交者: Linus Torvalds

[PATCH] NFS: fix minor bug in new NFS symlink code

The original code confused a zero return code from pagevec_add() as success.

Test plan:
None.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 cd9ae2b6
......@@ -1519,8 +1519,8 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
pagevec_init(&lru_pvec, 0);
if (!add_to_page_cache(page, dentry->d_inode->i_mapping, 0,
GFP_KERNEL)) {
if (!pagevec_add(&lru_pvec, page))
__pagevec_lru_add(&lru_pvec);
pagevec_add(&lru_pvec, page);
pagevec_lru_add(&lru_pvec);
SetPageUptodate(page);
unlock_page(page);
} else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册