From: Alex Elder Date: Mon, 6 May 2013 14:51:29 +0000 (-0500) Subject: rbd: refactor rbd_header_from_disk() X-Git-Tag: v3.10-rc2~28^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb23e37acb2ae9604130c4819fb8ae0f784a3a2b;p=pandora-kernel.git rbd: refactor rbd_header_from_disk() This rearranges rbd_header_from_disk so that it: - allocates the snapshot context right away - keeps results in local variables, not changing the passed-in header until it's known we'll succeed - does initialization of set-once fields in a header only if they have not already been set The last point is moot at the moment, because rbd_read_header() (the only caller) always supplies a zero-filled header buffer. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed