Use less syscalls
authorWouter Verhelst <w@uter.be>
Wed, 21 Mar 2012 11:12:49 +0000 (12:12 +0100)
committerWouter Verhelst <w@uter.be>
Wed, 21 Mar 2012 11:12:49 +0000 (12:12 +0100)
commita1b4d99dcf3d9dee877143e1de1da8b6b2ab57e1
tree6be7ce263fe9ca0c66f74ecf7c6b79f759585faa
parentaaec944edfd5921537d402d35adcf353757f8d50
Use less syscalls

If we've just done ftruncate, then either we were successful and know
the new file size (and then we don't need an lseek), or we weren't and
then we need to error out anyway.

Doing things this way also avoids another warning in the code.
nbd-server.c