diff options
-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 d044b35ce228..5f99ee551662 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, | |||
3379 | return rc; | 3379 | return rc; |
3380 | } | 3380 | } |
3381 | 3381 | ||
3382 | /* | ||
3383 | * cifs_readpage_worker must be called with the page pinned | ||
3384 | */ | ||
3382 | static int cifs_readpage_worker(struct file *file, struct page *page, | 3385 | static int cifs_readpage_worker(struct file *file, struct page *page, |
3383 | loff_t *poffset) | 3386 | loff_t *poffset) |
3384 | { | 3387 | { |
@@ -3390,7 +3393,6 @@ static int cifs_readpage_worker(struct file *file, struct page *page, | |||
3390 | if (rc == 0) | 3393 | if (rc == 0) |
3391 | goto read_complete; | 3394 | goto read_complete; |
3392 | 3395 | ||
3393 | page_cache_get(page); | ||
3394 | read_data = kmap(page); | 3396 | read_data = kmap(page); |
3395 | /* for reads over a certain size could initiate async read ahead */ | 3397 | /* for reads over a certain size could initiate async read ahead */ |
3396 | 3398 | ||
@@ -3417,7 +3419,6 @@ static int cifs_readpage_worker(struct file *file, struct page *page, | |||
3417 | 3419 | ||
3418 | io_error: | 3420 | io_error: |
3419 | kunmap(page); | 3421 | kunmap(page); |
3420 | page_cache_release(page); | ||
3421 | 3422 | ||
3422 | read_complete: | 3423 | read_complete: |
3423 | return rc; | 3424 | return rc; |