]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: set cursor in xfs_ail_splice() even when AIL was empty
authorAlex Elder <aelder@sgi.com>
Fri, 22 Jul 2011 16:04:41 +0000 (16:04 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 9 Aug 2011 20:30:43 +0000 (15:30 -0500)
commitd87a46bd327a15f45fdcbf65ef0d7b88a803cc4e
tree5482bffa17b6c335a1140d9a51857fe809772739
parent397132e40e671d14028ca0c7f6aef10b8aeea367
xfs: set cursor in xfs_ail_splice() even when AIL was empty

In xfs_ail_splice(), if a cursor is provided it is updated to
point to the last item on the list being spliced into the AIL.
But if the AIL was found to be empty, the cursor (if provided)
is just initialized instead.

There is no reason the empty AIL case needs to be treated any
differently.  And treating it the same way allows this code
to be rearranged a bit, with a somewhat tidier result.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_trans_ail.c