summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChristophe Kerello <christophe.kerello@st.com>2018-06-27 10:06:59 +0200
committerHeiko Schocher <hs@denx.de>2018-07-12 07:27:34 +0200
commit5a08cfee3967d6e8174d7de135af1daa8e4aea00 (patch)
tree8469ae722571c02de90930f864d564522dbec7f9 /fs
parent4a94e53b23031e6c1a7a03d0a863681002e06ffd (diff)
ubifs: remove useless code
By checking ubifs source code, s_instances parameter is not used anymore. So, set this parameter and the associated source code under __UBOOT__ compilation. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/super.c8
-rw-r--r--fs/ubifs/ubifs.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index abdef1e6ab8..9603163d8a0 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -2360,7 +2360,9 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
return ERR_PTR(err);
}
+#ifndef __UBOOT__
INIT_HLIST_NODE(&s->s_instances);
+#endif
INIT_LIST_HEAD(&s->s_inodes);
s->s_time_gran = 1000000000;
s->s_flags = flags;
@@ -2429,14 +2431,12 @@ retry:
#ifndef __UBOOT__
strlcpy(s->s_id, type->name, sizeof(s->s_id));
list_add_tail(&s->s_list, &super_blocks);
-#else
- strncpy(s->s_id, type->name, sizeof(s->s_id));
-#endif
hlist_add_head(&s->s_instances, &type->fs_supers);
-#ifndef __UBOOT__
spin_unlock(&sb_lock);
get_filesystem(type);
register_shrinker(&s->s_shrink);
+#else
+ strncpy(s->s_id, type->name, sizeof(s->s_id));
#endif
return s;
}
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 78c3a68216e..512fdaa1444 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -316,8 +316,8 @@ struct super_block {
struct backing_dev_info *s_bdi;
#endif
struct mtd_info *s_mtd;
- struct hlist_node s_instances;
#ifndef __UBOOT__
+ struct hlist_node s_instances;
struct quota_info s_dquot; /* Diskquota specific options */
#endif