diff options
Diffstat (limited to 'init/initramfs.c')
-rw-r--r-- | init/initramfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/init/initramfs.c b/init/initramfs.c index b37d34beb90b..37d3859b1b32 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -525,7 +525,7 @@ static void __init clean_rootfs(void) | |||
525 | int fd; | 525 | int fd; |
526 | void *buf; | 526 | void *buf; |
527 | struct linux_dirent64 *dirp; | 527 | struct linux_dirent64 *dirp; |
528 | int count; | 528 | int num; |
529 | 529 | ||
530 | fd = sys_open("/", O_RDONLY, 0); | 530 | fd = sys_open("/", O_RDONLY, 0); |
531 | WARN_ON(fd < 0); | 531 | WARN_ON(fd < 0); |
@@ -539,9 +539,9 @@ static void __init clean_rootfs(void) | |||
539 | } | 539 | } |
540 | 540 | ||
541 | dirp = buf; | 541 | dirp = buf; |
542 | count = sys_getdents64(fd, dirp, BUF_SIZE); | 542 | num = sys_getdents64(fd, dirp, BUF_SIZE); |
543 | while (count > 0) { | 543 | while (num > 0) { |
544 | while (count > 0) { | 544 | while (num > 0) { |
545 | struct stat st; | 545 | struct stat st; |
546 | int ret; | 546 | int ret; |
547 | 547 | ||
@@ -554,12 +554,12 @@ static void __init clean_rootfs(void) | |||
554 | sys_unlink(dirp->d_name); | 554 | sys_unlink(dirp->d_name); |
555 | } | 555 | } |
556 | 556 | ||
557 | count -= dirp->d_reclen; | 557 | num -= dirp->d_reclen; |
558 | dirp = (void *)dirp + dirp->d_reclen; | 558 | dirp = (void *)dirp + dirp->d_reclen; |
559 | } | 559 | } |
560 | dirp = buf; | 560 | dirp = buf; |
561 | memset(buf, 0, BUF_SIZE); | 561 | memset(buf, 0, BUF_SIZE); |
562 | count = sys_getdents64(fd, dirp, BUF_SIZE); | 562 | num = sys_getdents64(fd, dirp, BUF_SIZE); |
563 | } | 563 | } |
564 | 564 | ||
565 | sys_close(fd); | 565 | sys_close(fd); |