X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flvfs%2Ffsfilt_ext3.c;h=c89de20ac46fb542c3e661940ad7ea29307caf25;hp=85f4a1a934bacc24af34195d1a88f007834dcbd3;hb=d750891e478804bc495ffa075d771d1816369958;hpb=595ce7a56e34d59ae1644373bbc0bafa4cd77c4d diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 85f4a1a..c89de20 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1849,7 +1849,7 @@ static int v3_write_dqinfo(struct file *f, int type, struct if_dqinfo *info) static int v3_write_dqheader(struct file *f, int type) { static const __u32 quota_magics[] = V2_INITQMAGICS; - static const __u32 quota_versions[] = V2_INITQVERSIONS_R1; + static const __u32 quota_versions[] = LUSTRE_INITQVERSIONS_V2; struct v2_disk_dqheader dqhead; loff_t offset = 0; @@ -2034,14 +2034,27 @@ static int fsfilt_ext3_quotacheck(struct super_block *sb, /* we don't really need to take the group lock here, * but it may be useful if one day we support online * quotacheck */ +#ifdef HAVE_EXT4_LDISKFS + ext4_lock_group(sb, group); +#else spin_lock(sb_bgl_lock(sbi, group)); +#endif if (desc->bg_flags & cpu_to_le16(EXT3_BG_INODE_UNINIT)) { /* no inode in use in this group, just skip it */ +#ifdef HAVE_EXT4_LDISKFS + ext3_unlock_group(sb, group); +#else spin_unlock(sb_bgl_lock(sbi, group)); +#endif continue; } + used_count -= ext3_itable_unused_count(sb, desc); +#ifdef HAVE_EXT4_LDISKFS + ext3_unlock_group(sb, group); +#else spin_unlock(sb_bgl_lock(sbi, group)); +#endif } ino = group * sbi->s_inodes_per_group + 1;