diff options
-rw-r--r-- | init/initramfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index e44f2d932cc4..9ee7b7810417 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -310,7 +310,8 @@ static int __init do_name(void) | |||
310 | if (wfd >= 0) { | 310 | if (wfd >= 0) { |
311 | sys_fchown(wfd, uid, gid); | 311 | sys_fchown(wfd, uid, gid); |
312 | sys_fchmod(wfd, mode); | 312 | sys_fchmod(wfd, mode); |
313 | sys_ftruncate(wfd, body_len); | 313 | if (body_len) |
314 | sys_ftruncate(wfd, body_len); | ||
314 | vcollected = kstrdup(collected, GFP_KERNEL); | 315 | vcollected = kstrdup(collected, GFP_KERNEL); |
315 | state = CopyFile; | 316 | state = CopyFile; |
316 | } | 317 | } |