Commit 682f7c5c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ext2, udf and quota updates from Jan Kara:

 - some ext2 fixes and cleanups

 - a fix of udf bug when extending files

 - a fix of quota Q_XGETQSTAT[V] handling

* tag 'for_v5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  udf: Fix incorrect final NOT_ALLOCATED (hole) extent length
  ext2: Use kmemdup rather than duplicating its implementation
  quota: honor quota type in Q_XGETQSTAT[V] calls
  ext2: Always brelse bh on failure in ext2_iget()
  ext2: add missing brelse() in ext2_iget()
  ext2: Fix a typo in ext2_getattr argument
  ext2: fix a typo in comment
  ext2: add missing brelse() in ext2_new_inode()
  ext2: optimize ext2_xattr_get()
  ext2: introduce new helper for xattr entry comparison
  ext2: merge xattr next entry check to ext2_xattr_entry_valid()
  ext2: code cleanup for ext2_preread_inode()
  ext2: code cleanup by using test_opt() and clear_opt()
  doc: ext2: update description of quota options for ext2
  ext2: Strengthen xattr block checks
  ext2: Merge loops in ext2_xattr_set()
  ext2: introduce helper for xattr entry validation
  ext2: introduce helper for xattr header validation
  quota: add dqi_dirty_list description to comment of Dquot List Management
parents e6983afd fa33cdbf
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -57,7 +57,13 @@ noacl Don't support POSIX ACLs.

nobh				Do not attach buffer_heads to file pagecache.

grpquota,noquota,quota,usrquota	Quota options are silently ignored by ext2.
quota, usrquota			Enable user disk quota support
				(requires CONFIG_QUOTA).

grpquota			Enable group disk quota support
				(requires CONFIG_QUOTA).

noquota option ls silently ignored by ext2.


Specification
+1 −2
Original line number Diff line number Diff line
@@ -1197,7 +1197,7 @@ static int ext2_has_free_blocks(struct ext2_sb_info *sbi)

/*
 * Returns 1 if the passed-in block region is valid; 0 if some part overlaps
 * with filesystem metadata blocksi.
 * with filesystem metadata blocks.
 */
int ext2_data_block_valid(struct ext2_sb_info *sbi, ext2_fsblk_t start_blk,
			  unsigned int count)
@@ -1212,7 +1212,6 @@ int ext2_data_block_valid(struct ext2_sb_info *sbi, ext2_fsblk_t start_blk,
	    (start_blk + count >= sbi->s_sb_block))
		return 0;


	return 1;
}

+2 −3
Original line number Diff line number Diff line
@@ -172,9 +172,7 @@ static void ext2_preread_inode(struct inode *inode)
	struct backing_dev_info *bdi;

	bdi = inode_to_bdi(inode);
	if (bdi_read_congested(bdi))
		return;
	if (bdi_write_congested(bdi))
	if (bdi_rw_congested(bdi))
		return;

	block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(inode->i_sb);
@@ -511,6 +509,7 @@ repeat_in_this_group:
	/*
	 * Scanned all blockgroups.
	 */
	brelse(bitmap_bh);
	err = -ENOSPC;
	goto fail;
got:
+3 −4
Original line number Diff line number Diff line
@@ -1400,7 +1400,7 @@ void ext2_set_file_ops(struct inode *inode)
struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
{
	struct ext2_inode_info *ei;
	struct buffer_head * bh;
	struct buffer_head * bh = NULL;
	struct ext2_inode *raw_inode;
	struct inode *inode;
	long ret = -EIO;
@@ -1446,7 +1446,6 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
	 */
	if (inode->i_nlink == 0 && (inode->i_mode == 0 || ei->i_dtime)) {
		/* this inode is deleted */
		brelse (bh);
		ret = -ESTALE;
		goto bad_inode;
	}
@@ -1463,7 +1462,6 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
	    !ext2_data_block_valid(EXT2_SB(sb), ei->i_file_acl, 1)) {
		ext2_error(sb, "ext2_iget", "bad extended attribute block %u",
			   ei->i_file_acl);
		brelse(bh);
		ret = -EFSCORRUPTED;
		goto bad_inode;
	}
@@ -1526,6 +1524,7 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
	return inode;
	
bad_inode:
	brelse(bh);
	iget_failed(inode);
	return ERR_PTR(ret);
}
@@ -1640,7 +1639,7 @@ int ext2_write_inode(struct inode *inode, struct writeback_control *wbc)
}

int ext2_getattr(const struct path *path, struct kstat *stat,
		u32 request_mask, unsigned int query_falgs)
		u32 request_mask, unsigned int query_flags)
{
	struct inode *inode = d_inode(path->dentry);
	struct ext2_inode_info *ei = EXT2_I(inode);
+8 −9
Original line number Diff line number Diff line
@@ -303,16 +303,16 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
	if (test_opt(sb, NOBH))
		seq_puts(seq, ",nobh");

	if (sbi->s_mount_opt & EXT2_MOUNT_USRQUOTA)
	if (test_opt(sb, USRQUOTA))
		seq_puts(seq, ",usrquota");

	if (sbi->s_mount_opt & EXT2_MOUNT_GRPQUOTA)
	if (test_opt(sb, GRPQUOTA))
		seq_puts(seq, ",grpquota");

	if (sbi->s_mount_opt & EXT2_MOUNT_XIP)
	if (test_opt(sb, XIP))
		seq_puts(seq, ",xip");

	if (sbi->s_mount_opt & EXT2_MOUNT_DAX)
	if (test_opt(sb, DAX))
		seq_puts(seq, ",dax");

	if (!test_opt(sb, RESERVATION))
@@ -935,8 +935,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
	sbi->s_resgid = opts.s_resgid;

	sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
		((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ?
		 SB_POSIXACL : 0);
		(test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
	sb->s_iflags |= SB_I_CGROUPWB;

	if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV &&
@@ -967,11 +966,11 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)

	blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size);

	if (sbi->s_mount_opt & EXT2_MOUNT_DAX) {
	if (test_opt(sb, DAX)) {
		if (!bdev_dax_supported(sb->s_bdev, blocksize)) {
			ext2_msg(sb, KERN_ERR,
				"DAX unsupported by block device. Turning off DAX.");
			sbi->s_mount_opt &= ~EXT2_MOUNT_DAX;
			clear_opt(sbi->s_mount_opt, DAX);
		}
	}

@@ -1404,7 +1403,7 @@ out_set:
	sbi->s_resuid = new_opts.s_resuid;
	sbi->s_resgid = new_opts.s_resgid;
	sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
		((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? SB_POSIXACL : 0);
		(test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
	spin_unlock(&sbi->s_lock);

	return 0;
Loading