From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 05/19] fs: Add super_operations
Date: Tue, 3 Apr 2018 09:48:37 +0200 [thread overview]
Message-ID: <20180403074851.5411-6-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20180403074851.5411-1-s.hauer@pengutronix.de>
Add a struct super_operations we can use later when we get a fs
implementation closer to Linux. Only add the functions we'll likely
need though.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
fs/ubifs/super.c | 4 ----
fs/ubifs/ubifs.h | 35 -----------------------------------
include/linux/fs.h | 5 +++++
3 files changed, 5 insertions(+), 39 deletions(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index ce6e95e373..b4eb76202b 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -556,7 +556,6 @@ out:
done:
clear_inode(inode);
}
-#endif
static void ubifs_dirty_inode(struct inode *inode, int flags)
{
@@ -569,7 +568,6 @@ static void ubifs_dirty_inode(struct inode *inode, int flags)
}
}
-#ifndef __BAREBOX__
static int ubifs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct ubifs_info *c = dentry->d_sb->s_fs_info;
@@ -2107,9 +2105,7 @@ const struct super_operations ubifs_super_operations = {
.write_inode = ubifs_write_inode,
.evict_inode = ubifs_evict_inode,
.statfs = ubifs_statfs,
-#endif
.dirty_inode = ubifs_dirty_inode,
-#ifndef __BAREBOX__
.remount_fs = ubifs_remount_fs,
.show_options = ubifs_show_options,
.sync_fs = ubifs_sync_fs,
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
index 1391bd7283..22b24a1161 100644
--- a/fs/ubifs/ubifs.h
+++ b/fs/ubifs/ubifs.h
@@ -97,41 +97,6 @@ void *kmemdup(const void *src, size_t len, gfp_t gfp);
/* uapi/linux/limits.h */
#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
-struct super_operations {
- struct inode *(*alloc_inode)(struct super_block *sb);
- void (*destroy_inode)(struct inode *);
-
- void (*dirty_inode) (struct inode *, int flags);
-#ifndef __BAREBOX__
- int (*write_inode) (struct inode *, struct writeback_control *wbc);
-#endif
- int (*drop_inode) (struct inode *);
- void (*evict_inode) (struct inode *);
- void (*put_super) (struct super_block *);
- int (*sync_fs)(struct super_block *sb, int wait);
- int (*freeze_fs) (struct super_block *);
- int (*unfreeze_fs) (struct super_block *);
-#ifndef __BAREBOX__
- int (*statfs) (struct dentry *, struct kstatfs *);
-#endif
- int (*remount_fs) (struct super_block *, int *, char *);
- void (*umount_begin) (struct super_block *);
-
-#ifndef __BAREBOX__
- int (*show_options)(struct seq_file *, struct dentry *);
- int (*show_devname)(struct seq_file *, struct dentry *);
- int (*show_path)(struct seq_file *, struct dentry *);
- int (*show_stats)(struct seq_file *, struct dentry *);
-#endif
-#ifdef CONFIG_QUOTA
- ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
- ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
-#endif
- int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
- long (*nr_cached_objects)(struct super_block *, int);
- long (*free_cached_objects)(struct super_block *, long, int);
-};
-
/*
* get_seconds() not really needed in the read-only implmentation
*/
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c1a5802eea..153c464470 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -252,6 +252,11 @@ struct file {
#endif
};
+struct super_operations {
+ struct inode *(*alloc_inode)(struct super_block *sb);
+ void (*destroy_inode)(struct inode *);
+};
+
/*
* Inode flags - they have no relation to superblock flags now
*/
--
2.16.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-04-03 7:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 7:48 [PATCH 00/19] Add Linux dcache implementation Sascha Hauer
2018-04-03 7:48 ` [PATCH 01/19] rename file_operations -> cdev_operations Sascha Hauer
2018-04-03 7:48 ` [PATCH 02/19] ubifs: remove dead code Sascha Hauer
2018-04-03 7:48 ` [PATCH 03/19] ubifs: Remove Linux struct definitions we already have Sascha Hauer
2018-04-03 7:48 ` [PATCH 04/19] ubifs: remove dead code Sascha Hauer
2018-04-03 7:48 ` Sascha Hauer [this message]
2018-04-03 7:48 ` [PATCH 06/19] fs: Move mem_write/mem_read to devfs-core Sascha Hauer
2018-04-03 7:48 ` [PATCH 07/19] fs: Cleanup whitespace damage Sascha Hauer
2018-04-03 7:48 ` [PATCH 08/19] fs: Fix finding correct directory for mkdir/rmdir Sascha Hauer
2018-04-03 7:48 ` [PATCH 09/19] glob: do not unnecessarily opendir() a directory Sascha Hauer
2018-04-03 7:48 ` [PATCH 10/19] ls: Do not depend on normalise_path() Sascha Hauer
2018-04-03 7:48 ` [PATCH 11/19] loadenv: " Sascha Hauer
2018-04-03 7:48 ` [PATCH 12/19] fs: dcache implementation Sascha Hauer
2018-04-03 7:48 ` [PATCH 13/19] fs: ramfs: Switch to " Sascha Hauer
2018-04-03 7:48 ` [PATCH 14/19] fs: devfs: " Sascha Hauer
2018-04-03 7:48 ` [PATCH 15/19] fs: ext4: " Sascha Hauer
2018-04-03 7:48 ` [PATCH 16/19] fs: ubifs: " Sascha Hauer
2018-04-03 7:48 ` [PATCH 17/19] fs: nfs: " Sascha Hauer
2018-04-03 7:48 ` [PATCH 18/19] fs: tftp: " Sascha Hauer
2018-05-18 11:54 ` Philipp Zabel
2018-05-22 7:12 ` Sascha Hauer
2018-05-22 8:21 ` Philipp Zabel
2018-04-03 7:48 ` [PATCH 19/19] block: Adjust cache sizes Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180403074851.5411-6-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox