Commit 933efea8 authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: zero new log pages, etc.

parent e8c51293
...@@ -1811,7 +1811,7 @@ static int lbmLogInit(struct jfs_log * log) ...@@ -1811,7 +1811,7 @@ static int lbmLogInit(struct jfs_log * log)
lbuf = kmalloc(sizeof(struct lbuf), GFP_KERNEL); lbuf = kmalloc(sizeof(struct lbuf), GFP_KERNEL);
if (lbuf == 0) if (lbuf == 0)
goto error; goto error;
lbuf->l_ldata = (char *) __get_free_page(GFP_KERNEL); lbuf->l_ldata = (char *) get_zeroed_page(GFP_KERNEL);
if (lbuf->l_ldata == 0) { if (lbuf->l_ldata == 0) {
kfree(lbuf); kfree(lbuf);
goto error; goto error;
......
...@@ -341,6 +341,10 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, ...@@ -341,6 +341,10 @@ struct metapage *__get_metapage(struct inode *inode, unsigned long lblock,
} }
mp->data = kmap(mp->page) + page_offset; mp->data = kmap(mp->page) + page_offset;
} }
if (new)
memset(mp->data, 0, PSIZE);
jfs_info("__get_metapage: returning = 0x%p", mp); jfs_info("__get_metapage: returning = 0x%p", mp);
return mp; return mp;
......
...@@ -548,11 +548,11 @@ static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) ...@@ -548,11 +548,11 @@ static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags)
if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) == if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
SLAB_CTOR_CONSTRUCTOR) { SLAB_CTOR_CONSTRUCTOR) {
memset(jfs_ip, 0, sizeof(struct jfs_inode_info));
INIT_LIST_HEAD(&jfs_ip->anon_inode_list); INIT_LIST_HEAD(&jfs_ip->anon_inode_list);
init_rwsem(&jfs_ip->rdwrlock); init_rwsem(&jfs_ip->rdwrlock);
init_MUTEX(&jfs_ip->commit_sem); init_MUTEX(&jfs_ip->commit_sem);
init_rwsem(&jfs_ip->xattr_sem); init_rwsem(&jfs_ip->xattr_sem);
jfs_ip->atlhead = 0;
jfs_ip->active_ag = -1; jfs_ip->active_ag = -1;
#ifdef CONFIG_JFS_POSIX_ACL #ifdef CONFIG_JFS_POSIX_ACL
jfs_ip->i_acl = JFS_ACL_NOT_CACHED; jfs_ip->i_acl = JFS_ACL_NOT_CACHED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment