linux-next: manual merge of the creds tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

Today's linux-next merge of the creds tree got conflicts in
fs/ext4/balloc.c between commits 8c3bf8a01c005385e9be0bc992e10abfb355278c
("merge ext4_claim_free_blocks & ext4_has_free_blocks") and
a996031c87e093017c0763326a08896a3a4817f4 ("delay capable() check in
ext4_has_free_blocks()") from the ext4 tree and commit
e6396a30cfa855ccca8cc21bcd92bb40ed10619f ("CRED: Wrap task credential
accesses in the Ext4 filesystem") from the creds tree.

Overlapping change/move of code.  I fixed it up (see below) and can carry
the fix.
-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

diff --cc fs/ext4/balloc.c
index 9ce2fcd,5ede818..0000000
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@@ -618,19 -616,14 +618,19 @@@ int ext4_has_free_blocks(struct ext4_sb
  		}
  	}
  	/* Check whether we have space after
 -	 * accounting for current dirty blocks
 +	 * accounting for current dirty blocks & root reserved blocks.
  	 */
 -	if (free_blocks < ((root_blocks + nblocks) + dirty_blocks))
 -		/* we don't have free space */
 -		return -ENOSPC;
 +	if (free_blocks >= ((root_blocks + nblocks) + dirty_blocks))
 +		return 1;
 +
 +	/* Hm, nope.  Are (enough) root reserved blocks available? */
- 	if (sbi->s_resuid == current->fsuid ||
++	if (sbi->s_resuid == current_fsuid() ||
 +	    ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
 +	    capable(CAP_SYS_RESOURCE)) {
 +		if (free_blocks >= (nblocks + dirty_blocks))
 +			return 1;
 +	}
  
 -	/* Add the blocks to nblocks */
 -	percpu_counter_add(dbc, nblocks);
  	return 0;
  }
  
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux