Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186236
b: refs/heads/master
c: 8aaed5b
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Linus Torvalds committed Mar 6, 2010
1 parent 622985e commit 25291dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a85b8d6049cbb0e7961df2069322fbc4192026a
refs/heads/master: 8aaed5bec2b9177eab1796c8c4f7a4c90804eef6
12 changes: 6 additions & 6 deletions trunk/init/initramfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ static void __init clean_rootfs(void)
int fd;
void *buf;
struct linux_dirent64 *dirp;
int count;
int num;

fd = sys_open("/", O_RDONLY, 0);
WARN_ON(fd < 0);
Expand All @@ -539,9 +539,9 @@ static void __init clean_rootfs(void)
}

dirp = buf;
count = sys_getdents64(fd, dirp, BUF_SIZE);
while (count > 0) {
while (count > 0) {
num = sys_getdents64(fd, dirp, BUF_SIZE);
while (num > 0) {
while (num > 0) {
struct stat st;
int ret;

Expand All @@ -554,12 +554,12 @@ static void __init clean_rootfs(void)
sys_unlink(dirp->d_name);
}

count -= dirp->d_reclen;
num -= dirp->d_reclen;
dirp = (void *)dirp + dirp->d_reclen;
}
dirp = buf;
memset(buf, 0, BUF_SIZE);
count = sys_getdents64(fd, dirp, BUF_SIZE);
num = sys_getdents64(fd, dirp, BUF_SIZE);
}

sys_close(fd);
Expand Down

0 comments on commit 25291dc

Please sign in to comment.