From: Ritesh Harjani <riteshh@linux.ibm.com>
To: linux-fsdevel@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, Ritesh Harjani <riteshh@linux.ibm.com>
Subject: [PATCHv2 REBASED] bad_inode: add missing i_op initializers for fileattr_get/_set
Date: Sat, 19 Feb 2022 13:39:17 +0530 [thread overview]
Message-ID: <456975d5d84b1098d5edc49619cfd9a736fc8594.1645257680.git.riteshh@linux.ibm.com> (raw)
Let's bring inode_operations in sync for bad_inode_ops.
Some of the reasons for doing this are listed here [1].
But mostly it is just for completeness sake.
[1]: https://lore.kernel.org/lkml/1473708559-12714-2-git-send-email-mszeredi@redhat.com/
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
---
v1 -> v2
1. Rebased.
2. Removed end of line whitespace fixes as it could quickly give conflicts
while applying.
fs/bad_inode.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index 12b8fdcc445b..cefd4ed8d5b2 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -160,6 +160,17 @@ static int bad_inode_set_acl(struct user_namespace *mnt_userns,
return -EIO;
}
+static int bad_inode_fileattr_set(struct user_namespace *mnt_userns,
+ struct dentry *dentry, struct fileattr *fa)
+{
+ return -EIO;
+}
+
+static int bad_inode_fileattr_get(struct dentry *dentry, struct fileattr *fa)
+{
+ return -EIO;
+}
+
static const struct inode_operations bad_inode_ops =
{
.create = bad_inode_create,
@@ -183,6 +194,8 @@ static const struct inode_operations bad_inode_ops =
.atomic_open = bad_inode_atomic_open,
.tmpfile = bad_inode_tmpfile,
.set_acl = bad_inode_set_acl,
+ .fileattr_set = bad_inode_fileattr_set,
+ .fileattr_get = bad_inode_fileattr_get,
};
--
2.25.1
reply other threads:[~2022-02-19 8:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=456975d5d84b1098d5edc49619cfd9a736fc8594.1645257680.git.riteshh@linux.ibm.com \
--to=riteshh@linux.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).