From: Tao Ma Date: Thu, 8 Apr 2010 08:33:02 +0000 (+0800) Subject: ocfs2: make ocfs2_adjust_resv_from_alloc simple. X-Git-Tag: v2.6.35-rc1~469^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b065556a7d1a9205403db77a318a5c5aa530e701;p=pandora-kernel.git ocfs2: make ocfs2_adjust_resv_from_alloc simple. When we allocate some bits from the reservation, we always allocate from the r_start(see ocfs2_resmap_resv_bits). So there should be no reason to check between r_start and start. And I don't think we will change this behaviour later by allocating from some bits after r_start. Why not make ocfs2_adjust_resv_from_alloc simple for now? The only chance we have to adjust the reservation is when we haven't reached the end. With this patch, the function is more readable. Note: btw, this patch also fixes an original bug in the function which I haven't found before. if (end < ocfs2_resv_end(resv)) rhs = end - ocfs2_resv_end(resv); This code is of course buggy. ;) Signed-off-by: Tao Ma Acked-by: Mark Fasheh Signed-off-by: Joel Becker --- Reading git-diff-tree failed