All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ext4: fold two if statements into one
@ 2011-10-26  7:11 Yongqiang Yang
  2011-10-26  7:11 ` [PATCH 2/4] ext4: move variable to its scope Yongqiang Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Yongqiang Yang @ 2011-10-26  7:11 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4, Yongqiang Yang

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/extents.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index f1ed90b..f887023 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4082,18 +4082,17 @@ got_allocated_blocks:
 		 */
 		reserved_clusters = get_reserved_cluster_alloc(inode,
 						map->m_lblk, allocated);
-		if (map->m_flags & EXT4_MAP_FROM_CLUSTER) {
-			if (reserved_clusters) {
-				/*
-				 * We have clusters reserved for this range.
-				 * But since we are not doing actual allocation
-				 * and are simply using blocks from previously
-				 * allocated cluster, we should release the
-				 * reservation and not claim quota.
-				 */
-				ext4_da_update_reserve_space(inode,
-						reserved_clusters, 0);
-			}
+		if ((map->m_flags & EXT4_MAP_FROM_CLUSTER) &&
+		    reserved_clusters) {
+			/*
+			 * We have clusters reserved for this range.
+			 * But since we are not doing actual allocation
+			 * and are simply using blocks from previously
+			 * allocated cluster, we should release the
+			 * reservation and not claim quota.
+			 */
+			ext4_da_update_reserve_space(inode,
+					reserved_clusters, 0);
 		} else {
 			BUG_ON(allocated_clusters < reserved_clusters);
 			/* We will claim quota for all newly allocated blocks.*/
-- 
1.7.5.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-29 18:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26  7:11 [PATCH 1/4] ext4: fold two if statements into one Yongqiang Yang
2011-10-26  7:11 ` [PATCH 2/4] ext4: move variable to its scope Yongqiang Yang
2011-10-29 13:24   ` Ted Ts'o
2011-10-26  7:11 ` [PATCH 3/4] ext4: let AGGRESSIVE_TEST brace code only related to itself Yongqiang Yang
2011-10-29 13:30   ` Ted Ts'o
2011-10-26  7:11 ` [PATCH 4/4] ext4: trace punch_hole correctly in ext4_ext_map_blocks Yongqiang Yang
2011-10-29 13:51   ` Ted Ts'o
2011-10-29 13:14 ` [PATCH 1/4] ext4: fold two if statements into one Ted Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.