diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/autofs4/waitq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 0146d911f468..631f1554c87b 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
@@ -66,11 +66,12 @@ static int autofs4_write(struct autofs_sb_info *sbi, | |||
66 | set_fs(KERNEL_DS); | 66 | set_fs(KERNEL_DS); |
67 | 67 | ||
68 | mutex_lock(&sbi->pipe_mutex); | 68 | mutex_lock(&sbi->pipe_mutex); |
69 | wr = __vfs_write(file, data, bytes, &file->f_pos); | 69 | while (bytes) { |
70 | while (bytes && wr) { | 70 | wr = __vfs_write(file, data, bytes, &file->f_pos); |
71 | if (wr <= 0) | ||
72 | break; | ||
71 | data += wr; | 73 | data += wr; |
72 | bytes -= wr; | 74 | bytes -= wr; |
73 | wr = __vfs_write(file, data, bytes, &file->f_pos); | ||
74 | } | 75 | } |
75 | mutex_unlock(&sbi->pipe_mutex); | 76 | mutex_unlock(&sbi->pipe_mutex); |
76 | 77 | ||