mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	xfs: eager inode attr fork init needs attr feature awareness
The pitfalls of regression testing on a machine without realising
that selinux was disabled. Only set the attr fork during inode
allocation if the attr feature bits are already set on the
superblock.
Fixes: e6a688c332 ("xfs: initialise attr fork on inode create")
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Tested-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
			
			
This commit is contained in:
		
							parent
							
								
									ae7bae68ea
								
							
						
					
					
						commit
						2442ee15bb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -872,7 +872,7 @@ xfs_init_new_inode(
 | 
			
		|||
	 * this saves us from needing to run a separate transaction to set the
 | 
			
		||||
	 * fork offset in the immediate future.
 | 
			
		||||
	 */
 | 
			
		||||
	if (init_xattrs) {
 | 
			
		||||
	if (init_xattrs && xfs_sb_version_hasattr(&mp->m_sb)) {
 | 
			
		||||
		ip->i_forkoff = xfs_default_attroffset(ip) >> 3;
 | 
			
		||||
		ip->i_afp = xfs_ifork_alloc(XFS_DINODE_FMT_EXTENTS, 0);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue