summaryrefslogtreecommitdiff
path: root/fs/aufs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aufs/super.c')
-rw-r--r--fs/aufs/super.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index 3fe10d35d..98cfd64dd 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -456,16 +456,6 @@ static void aufs_put_super(struct super_block *sb)
/* ---------------------------------------------------------------------- */
-void au_array_free(void *array)
-{
- if (array) {
- if (!is_vmalloc_addr(array))
- kfree(array);
- else
- vfree(array);
- }
-}
-
void *au_array_alloc(unsigned long long *hint, au_arraycb_t cb,
struct super_block *sb, void *arg)
{
@@ -542,7 +532,7 @@ void au_iarray_free(struct inode **a, unsigned long long max)
for (ull = 0; ull < max; ull++)
iput(a[ull]);
- au_array_free(a);
+ kvfree(a);
}
/* ---------------------------------------------------------------------- */
@@ -767,7 +757,9 @@ static int aufs_remount_fs(struct super_block *sb, int *flags, char *data)
{
int err, do_dx;
unsigned int mntflags;
- struct au_opts opts;
+ struct au_opts opts = {
+ .opt = NULL
+ };
struct dentry *root;
struct inode *inode;
struct au_sbinfo *sbinfo;
@@ -785,7 +777,6 @@ static int aufs_remount_fs(struct super_block *sb, int *flags, char *data)
}
err = -ENOMEM;
- memset(&opts, 0, sizeof(opts));
opts.opt = (void *)__get_free_page(GFP_NOFS);
if (unlikely(!opts.opt))
goto out;
@@ -886,7 +877,9 @@ static int aufs_fill_super(struct super_block *sb, void *raw_data,
int silent __maybe_unused)
{
int err;
- struct au_opts opts;
+ struct au_opts opts = {
+ .opt = NULL
+ };
struct au_sbinfo *sbinfo;
struct dentry *root;
struct inode *inode;
@@ -899,7 +892,6 @@ static int aufs_fill_super(struct super_block *sb, void *raw_data,
}
err = -ENOMEM;
- memset(&opts, 0, sizeof(opts));
opts.opt = (void *)__get_free_page(GFP_NOFS);
if (unlikely(!opts.opt))
goto out;