summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/orangefs-debugfs.c
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-12-22 17:13:50 +0100
committerMike Marshall <hubcap@omnibond.com>2015-12-28 10:30:51 -0500
commitdde58ca4367a216d51c4e034f1f0195e5923c934 (patch)
tree64cac4317a194ecd4112adc5bca1a68639666834 /fs/orangefs/orangefs-debugfs.c
parent62441fa53bccc69fe344e6b20be0680cca0fbc15 (diff)
downloadop-kernel-dev-dde58ca4367a216d51c4e034f1f0195e5923c934.zip
op-kernel-dev-dde58ca4367a216d51c4e034f1f0195e5923c934.tar.gz
Orangefs: use kzalloc for kmalloc + memset 0
This is an API consolidation only. The use of kmalloc + memset to 0 should be equivalent to kzalloc in this case. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/orangefs-debugfs.c')
-rw-r--r--fs/orangefs/orangefs-debugfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 7319f1a..9eb7972 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -365,10 +365,9 @@ static ssize_t orangefs_debug_write(struct file *file,
count = ORANGEFS_MAX_DEBUG_STRING_LEN + 1;
}
- buf = kmalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
+ buf = kzalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);
if (!buf)
goto out;
- memset(buf, 0, ORANGEFS_MAX_DEBUG_STRING_LEN);
if (copy_from_user(buf, ubuf, count - 1)) {
gossip_debug(GOSSIP_DEBUGFS_DEBUG,
OpenPOWER on IntegriCloud