Skip to content

Commit

Permalink
LU-1812 ldiskfs: don't use sb->s_qf_inums
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: Ie1b824183cf734a0f242bb6483a192f1919dc4be
Reviewed-on: http://review.whamcloud.com/5264
Tested-by: Hudson
Tested-by: Maloo <[email protected]>
Reviewed-by: James Simmons <[email protected]>
Reviewed-by: Johann Lombardi <[email protected]>
Reviewed-by: Niu Yawei <[email protected]>
  • Loading branch information
jeffmahoney authored and Oleg Drokin committed Feb 10, 2013
1 parent b7835ef commit 5c584d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lustre/osd-ldiskfs/osd_quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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);
Expand Down

0 comments on commit 5c584d0

Please sign in to comment.