From: Ivan Shapovalov <intelfx100@gmail.com>
To: reiserfs-devel@vger.kernel.org
Cc: Ivan Shapovalov <intelfx100@gmail.com>
Subject: [PATCH 3/3] Adjust reiser4 for 3.19: convert to private i_dquot field.
Date: Sat, 14 Feb 2015 03:44:43 +0300 [thread overview]
Message-ID: <1423874683-7787-3-git-send-email-intelfx100@gmail.com> (raw)
In-Reply-To: <1423874683-7787-1-git-send-email-intelfx100@gmail.com>
Upstream commit 75cbe701a4251fcd8b846d52ae42f88c9a8e5e93
"vfs: Remove i_dquot field from inode".
Example taken from upstream commit 53873638bd7cbcbf43cea72f0eb0d2ee9260f059
"reiserfs: Convert to private i_dquot field".
reiser4 does not support quotas, but there's rudimentary code doing some quota
operations, and in order for it not to segfault we need to act like we do
support quotas.
Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
---
Hopefully I've done the right thing. Another option would be to simply remove
all the quota-related code.
fs/reiser4/inode.h | 4 ++++
fs/reiser4/super_ops.c | 15 ++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/fs/reiser4/inode.h b/fs/reiser4/inode.h
index 95e1d9e..43f7731 100644
--- a/fs/reiser4/inode.h
+++ b/fs/reiser4/inode.h
@@ -154,6 +154,10 @@ struct reiser4_inode {
* fs/reiser4/search.c:handle_vroot() */
reiser4_block_nr vroot;
struct mutex loading;
+
+#ifdef CONFIG_QUOTA
+ struct dquot *i_dquot[MAXQUOTAS];
+#endif
};
void loading_init_once(reiser4_inode *);
diff --git a/fs/reiser4/super_ops.c b/fs/reiser4/super_ops.c
index 7e319bb..b196835 100644
--- a/fs/reiser4/super_ops.c
+++ b/fs/reiser4/super_ops.c
@@ -113,6 +113,9 @@ static struct inode *reiser4_alloc_inode(struct super_block *super)
/* this deals with info's loading semaphore */
loading_alloc(info);
info->vroot = UBER_TREE_ADDR;
+#ifdef CONFIG_QUOTA
+ memset(&info->i_dquot, 0, sizeof(info->i_dquot));
+#endif
return &obj->vfs_inode;
} else
return NULL;
@@ -477,6 +480,13 @@ static int reiser4_show_options(struct seq_file *m, struct dentry *dentry)
return 0;
}
+#ifdef CONFIG_QUOTA
+static struct dquot **reiser4_get_dquots(struct inode *inode)
+{
+ return reiser4_inode_data(inode)->i_dquot;
+}
+#endif
+
struct super_operations reiser4_super_operations = {
.alloc_inode = reiser4_alloc_inode,
.destroy_inode = reiser4_destroy_inode,
@@ -487,7 +497,10 @@ struct super_operations reiser4_super_operations = {
.statfs = reiser4_statfs,
.remount_fs = reiser4_remount,
.writeback_inodes = reiser4_writeback_inodes,
- .show_options = reiser4_show_options
+ .show_options = reiser4_show_options,
+#ifdef CONFIG_QUOTA
+ .get_dquots = reiser4_get_dquots,
+#endif
};
/**
--
2.3.0
prev parent reply other threads:[~2015-02-14 0:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-14 0:44 [PATCH 1/3] Adjust reiser4 for 3.19: ->f_dentry is gone, use file_inode() instead of ->f_dentry->d_inode Ivan Shapovalov
2015-02-14 0:44 ` [PATCH 2/3] Adjust reiser4 for 3.19: ->f_dentry is gone, convert remaining uses to an equivalent Ivan Shapovalov
2015-02-14 0:44 ` Ivan Shapovalov [this message]
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=1423874683-7787-3-git-send-email-intelfx100@gmail.com \
--to=intelfx100@gmail.com \
--cc=reiserfs-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).