From: Al Viro <v...@zeniv.linux.org.uk> Signed-off-by: Al Viro <v...@zeniv.linux.org.uk> --- fs/jfs/jfs_dtree.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index e585852..56d18de 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c @@ -3023,7 +3023,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx) struct ldtentry *d; struct dtslot *t; int d_namleft, len, outlen; - unsigned long dirent_buf; + void *dirent_buf; char *name_ptr; u32 dir_index; int do_index = 0; @@ -3180,8 +3180,8 @@ int jfs_readdir(struct file *file, struct dir_context *ctx) } } - dirent_buf = __get_free_page(GFP_KERNEL); - if (dirent_buf == 0) { + dirent_buf = (void *)__get_free_page(GFP_KERNEL); + if (!dirent_buf) { DT_PUTPAGE(mp); jfs_warn("jfs_readdir: __get_free_page failed!"); ctx->pos = DIREND; @@ -3198,7 +3198,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx) for (i = index; i < p->header.nextindex; i++) { d = (struct ldtentry *) & p->slot[stbl[i]]; - if (((long) jfs_dirent + d->namlen + 1) > + if (((void *) jfs_dirent + d->namlen + 1) > (dirent_buf + PAGE_SIZE)) { /* DBCS codepages could overrun dirent_buf */ index = i; @@ -3324,13 +3324,13 @@ skip_one: DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); if (rc) { - free_page((void *)dirent_buf); + free_page(dirent_buf); return rc; } } out: - free_page((void *)dirent_buf); + free_page(dirent_buf); return rc; } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/