From fea3ff1f67287e9628ee3201444e3c4bc42b5287 Mon Sep 17 00:00:00 2001 From: Randy Robertson Date: Mon, 13 Apr 2009 14:40:04 -0700 Subject: [PATCH] --- yaml --- r: 143212 b: refs/heads/master c: d20d5a7456d57d8affa88f45f27ae96ea49c29e4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/init/initramfs.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e87c57004f83..4eb03cfcf9cf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f1671f6d783a2385d32e11f456cbe32f0e4b4b49 +refs/heads/master: d20d5a7456d57d8affa88f45f27ae96ea49c29e4 diff --git a/trunk/init/initramfs.c b/trunk/init/initramfs.c index e44f2d932cc4..9ee7b7810417 100644 --- a/trunk/init/initramfs.c +++ b/trunk/init/initramfs.c @@ -310,7 +310,8 @@ static int __init do_name(void) if (wfd >= 0) { sys_fchown(wfd, uid, gid); sys_fchmod(wfd, mode); - sys_ftruncate(wfd, body_len); + if (body_len) + sys_ftruncate(wfd, body_len); vcollected = kstrdup(collected, GFP_KERNEL); state = CopyFile; }