From 5c584d02f247a992fd45779846355c061e0a1835 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 4 Feb 2013 16:52:14 -0500 Subject: [PATCH] LU-1812 ldiskfs: don't use sb->s_qf_inums ext4-quota-first-class.patch was finally accepted into the mainline Linux kernel via commit 7c319d32 (v3.6). The final version doesn't include the cached inode numbers so they aren't available on newer kernels that include this patch (or that are using an ldiskfs patched using the usptream version). Since the file system will refuse mounting when the inodes can't be read, the lookup code isn't invoked without valid inode numbers anyway. Signed-off-by: Jeff Mahoney Change-Id: Ie1b824183cf734a0f242bb6483a192f1919dc4be Reviewed-on: http://review.whamcloud.com/5264 Tested-by: Hudson Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Johann Lombardi Reviewed-by: Niu Yawei --- lustre/osd-ldiskfs/osd_quota.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lustre/osd-ldiskfs/osd_quota.c b/lustre/osd-ldiskfs/osd_quota.c index 741516b..9e16533 100644 --- a/lustre/osd-ldiskfs/osd_quota.c +++ b/lustre/osd-ldiskfs/osd_quota.c @@ -65,6 +65,10 @@ int osd_acct_obj_lookup(struct osd_thread_info *info, struct osd_device *osd, const struct lu_fid *fid, struct osd_inode_id *id) { struct super_block *sb = osd_sb(osd); + unsigned long qf_inums[2] = { + le32_to_cpu(LDISKFS_SB(sb)->s_es->s_usr_quota_inum), + le32_to_cpu(LDISKFS_SB(sb)->s_es->s_grp_quota_inum) + }; ENTRY; LASSERT(fid_is_acct(fid)); @@ -74,7 +78,7 @@ int osd_acct_obj_lookup(struct osd_thread_info *info, struct osd_device *osd, RETURN(-ENOENT); id->oii_gen = OSD_OII_NOGEN; - id->oii_ino = LDISKFS_SB(sb)->s_qf_inums[fid2type(fid)]; + id->oii_ino = qf_inums[fid2type(fid)]; if (!ldiskfs_valid_inum(sb, id->oii_ino)) RETURN(-ENOENT); RETURN(0); -- 1.8.3.1