projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03d9440
)
ceph: use kmem_cache_zalloc
author
Geliang Tang
<
[email protected]
>
Sun, 13 Mar 2016 07:26:29 +0000
(15:26 +0800)
committer
Ilya Dryomov
<
[email protected]
>
Fri, 25 Mar 2016 17:51:56 +0000
(18:51 +0100)
Use kmem_cache_zalloc() instead of kmem_cache_alloc() with flag GFP_ZERO.
Signed-off-by: Geliang Tang <
[email protected]
>
Signed-off-by: Ilya Dryomov <
[email protected]
>
fs/ceph/dir.c
patch
|
blob
|
history
fs/ceph/file.c
patch
|
blob
|
history
diff --git
a/fs/ceph/dir.c
b/fs/ceph/dir.c
index d6c13f9c931793cc9901e6d892200432c05bd4f4..fadc243dfb284b90a63961f4a48c372f483c1142 100644
(file)
--- a/
fs/ceph/dir.c
+++ b/
fs/ceph/dir.c
@@
-38,7
+38,7
@@
int ceph_init_dentry(struct dentry *dentry)
if (dentry->d_fsdata)
return 0;
- di = kmem_cache_
alloc(ceph_dentry_cachep, GFP_KERNEL | __GFP_ZERO
);
+ di = kmem_cache_
zalloc(ceph_dentry_cachep, GFP_KERNEL
);
if (!di)
return -ENOMEM; /* oh well */
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index 334a75170a3badae4f0f130548cfc656d234f94a..ef38f01c1795a1187f2190a05f7ebd06bd9bc69e 100644
(file)
--- a/
fs/ceph/file.c
+++ b/
fs/ceph/file.c
@@
-157,7
+157,7
@@
static int ceph_init_file(struct inode *inode, struct file *file, int fmode)
case S_IFDIR:
dout("init_file %p %p 0%o (regular)\n", inode, file,
inode->i_mode);
- cf = kmem_cache_
alloc(ceph_file_cachep, GFP_KERNEL | __GFP_ZERO
);
+ cf = kmem_cache_
zalloc(ceph_file_cachep, GFP_KERNEL
);
if (cf == NULL) {
ceph_put_fmode(ceph_inode(inode), fmode); /* clean up */
return -ENOMEM;