提交 75992b0f 编写于 作者: A Al Viro 提交者: Mike Marshall

pvfs2_fill_sb(): use kzalloc()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 5c0dbbc6
...@@ -358,10 +358,9 @@ static int pvfs2_fill_sb(struct super_block *sb, ...@@ -358,10 +358,9 @@ static int pvfs2_fill_sb(struct super_block *sb,
/* alloc and init our private pvfs2 sb info */ /* alloc and init our private pvfs2 sb info */
sb->s_fs_info = sb->s_fs_info =
kmalloc(sizeof(struct pvfs2_sb_info_s), PVFS2_GFP_FLAGS); kzalloc(sizeof(struct pvfs2_sb_info_s), PVFS2_GFP_FLAGS);
if (!PVFS2_SB(sb)) if (!PVFS2_SB(sb))
return -ENOMEM; return -ENOMEM;
memset(sb->s_fs_info, 0, sizeof(struct pvfs2_sb_info_s));
PVFS2_SB(sb)->sb = sb; PVFS2_SB(sb)->sb = sb;
PVFS2_SB(sb)->root_khandle = fs_mount->root_khandle; PVFS2_SB(sb)->root_khandle = fs_mount->root_khandle;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册