summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2010-04-08 08:33:02 (GMT)
committerJoel Becker <joel.becker@oracle.com>2010-05-06 01:18:09 (GMT)
commitb065556a7d1a9205403db77a318a5c5aa530e701 (patch)
treefd8ef1e5e67c624c9fb04689e4a4765e2e59acf8 /drivers
parent4b37fcb7d41ce3b9264b9562d6ffd62db9294bd1 (diff)
downloadlinux-fsl-qoriq-b065556a7d1a9205403db77a318a5c5aa530e701.tar.xz
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 <tao.ma@oracle.com> Acked-by: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions