summaryrefslogtreecommitdiffstats
path: root/kernel/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/nfs/write.c')
-rw-r--r--kernel/fs/nfs/write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/fs/nfs/write.c b/kernel/fs/nfs/write.c
index 7b9316406..7a9b6e347 100644
--- a/kernel/fs/nfs/write.c
+++ b/kernel/fs/nfs/write.c
@@ -1261,6 +1261,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;
@@ -1271,7 +1274,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;