diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2013-09-13 14:11:56 +0100 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-09-13 16:24:43 -0500 |
commit | a9e9b7bc15a32ec5b0679704e70f3ffeecfaadd8 (patch) | |
tree | 2ab7abf527707b078012164a40af12ee02641aff /fs/cifs | |
parent | bdbdfdef5766c2a60185e946df242f1bc0d37c09 (diff) | |
download | op-kernel-dev-a9e9b7bc15a32ec5b0679704e70f3ffeecfaadd8.zip op-kernel-dev-a9e9b7bc15a32ec5b0679704e70f3ffeecfaadd8.tar.gz |
cifs: Do not take a reference to the page in cifs_readpage_worker()
We do not need to take a reference to the pagecache in
cifs_readpage_worker() since the calling function will have already
taken one before passing the pointer to the page as an argument to the
function.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index d044b35..5f99ee5 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3379,6 +3379,9 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, return rc; } +/* + * cifs_readpage_worker must be called with the page pinned + */ static int cifs_readpage_worker(struct file *file, struct page *page, loff_t *poffset) { @@ -3390,7 +3393,6 @@ static int cifs_readpage_worker(struct file *file, struct page *page, if (rc == 0) goto read_complete; - page_cache_get(page); read_data = kmap(page); /* for reads over a certain size could initiate async read ahead */ @@ -3417,7 +3419,6 @@ static int cifs_readpage_worker(struct file *file, struct page *page, io_error: kunmap(page); - page_cache_release(page); read_complete: return rc; |