aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 90f292b520d2..404c19c866a7 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -354,6 +354,15 @@ static int nfs_write_begin(struct file *file, struct address_space *mapping,
354 file->f_path.dentry->d_name.name, 354 file->f_path.dentry->d_name.name,
355 mapping->host->i_ino, len, (long long) pos); 355 mapping->host->i_ino, len, (long long) pos);
356 356
357 /*
358 * Prevent starvation issues if someone is doing a consistency
359 * sync-to-disk
360 */
361 ret = wait_on_bit(&NFS_I(mapping->host)->flags, NFS_INO_FLUSHING,
362 nfs_wait_bit_killable, TASK_KILLABLE);
363 if (ret)
364 return ret;
365
357 page = grab_cache_page_write_begin(mapping, index, flags); 366 page = grab_cache_page_write_begin(mapping, index, flags);
358 if (!page) 367 if (!page)
359 return -ENOMEM; 368 return -ENOMEM;