From: Wu Jianyue <wujianyue000@gmail.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Wu Jianyue <wujianyue000@gmail.com>
Subject: [PATCH] ext4: Put inode_operations in inode.c
Date: Fri, 28 Apr 2023 21:34:20 +0800 [thread overview]
Message-ID: <20230428133420.6959-1-wujianyue000@gmail.com> (raw)
inode_operations is more suitable to put in inode.c,
instead of file.c, so moved to inode.c.
Because struct inode_operations's functions are already
included in header file, so no need to change header files.
Signed-off-by: Wu Jianyue <wujianyue000@gmail.com>
---
fs/ext4/file.c | 11 -----------
fs/ext4/inode.c | 12 ++++++++++++
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 0b8b4499e5ca..a64184c74e4e 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -961,14 +961,3 @@ const struct file_operations ext4_file_operations = {
.fallocate = ext4_fallocate,
};
-const struct inode_operations ext4_file_inode_operations = {
- .setattr = ext4_setattr,
- .getattr = ext4_file_getattr,
- .listxattr = ext4_listxattr,
- .get_inode_acl = ext4_get_acl,
- .set_acl = ext4_set_acl,
- .fiemap = ext4_fiemap,
- .fileattr_get = ext4_fileattr_get,
- .fileattr_set = ext4_fileattr_set,
-};
-
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 8dbd352e3986..db08dd51b6b3 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -6147,3 +6147,15 @@ vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf)
ext4_journal_stop(handle);
goto out;
}
+
+const struct inode_operations ext4_file_inode_operations = {
+ .setattr = ext4_setattr,
+ .getattr = ext4_file_getattr,
+ .listxattr = ext4_listxattr,
+ .get_inode_acl = ext4_get_acl,
+ .set_acl = ext4_set_acl,
+ .fiemap = ext4_fiemap,
+ .fileattr_get = ext4_fileattr_get,
+ .fileattr_set = ext4_fileattr_set,
+};
+
--
2.34.1
next reply other threads:[~2023-04-28 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 13:34 Wu Jianyue [this message]
2023-04-28 17:59 ` Theodore Ts'o
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=20230428133420.6959-1-wujianyue000@gmail.com \
--to=wujianyue000@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®