sbin/hammer: Refactor get_buffer()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Thu, 24 Mar 2016 16:48:30 +0000 (01:48 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 27 Mar 2016 15:43:22 +0000 (00:43 +0900)
commitec458f1f2501a20d84a568f255306fac2055f27f
treed718eddc69290fc8a82a7a36e7a2d25ce62aa450
parentf1833f81bd066ffb692453e7ea9ef259dd209535
sbin/hammer: Refactor get_buffer()

buf and buf->ondisk are allocated and freed at the same time.
buf->ondisk is always NULL if buf hasn't existed, but
buf->ondisk is never NULL if buf already exists.

There isn't a situation where buf exists but buf->ondisk is
not malloced or thrown away.
sbin/hammer/ondisk.c