diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-08-23 12:31:58 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-08-23 12:31:58 +0800 |
commit | 5580dff37b9e49623399cb253a7cbef82d9f776a (patch) | |
tree | 2ec65f56daacb74da580fee7394334aa5e92aee2 /fs/nfs | |
parent | 98fb754c57ea86c1ea5f18a82568f620d748c1bc (diff) | |
parent | 99f614a3bb23603a947be2e95b78507112c484e5 (diff) |
Merge tag 'v4.1.31' into linux-linaro-lsk-v4.1
This is the 4.1.31 stable release
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/write.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index cd9c46944f9a..78ff21111ecd 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1242,6 +1242,9 @@ int nfs_updatepage(struct file *file, struct page *page, dprintk("NFS: nfs_updatepage(%pD2 %d@%lld)\n", file, count, (long long)(page_file_offset(page) + offset)); + if (!count) + goto out; + if (nfs_can_extend_write(file, page, inode)) { count = max(count + offset, nfs_page_length(page)); offset = 0; @@ -1252,7 +1255,7 @@ int nfs_updatepage(struct file *file, struct page *page, nfs_set_pageerror(page); else __set_page_dirty_nobuffers(page); - +out: dprintk("NFS: nfs_updatepage returns %d (isize %lld)\n", status, (long long)i_size_read(inode)); return status; |