Skip to content

Commit

Permalink
[PATCH] NFS: fix minor bug in new NFS symlink code
Browse files Browse the repository at this point in the history
The original code confused a zero return code from pagevec_add() as success.

Test plan:
None.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Chuck Lever authored and Linus Torvalds committed Oct 20, 2006
1 parent cd9ae2b commit 39cf8a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39cf8a1

Please sign in to comment.