summaryrefslogtreecommitdiffstats
path: root/utils/statd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-01-14 12:23:53 -0500
committerSteve Dickson <steved@redhat.com>2010-01-15 14:55:51 -0500
commitb148d3414a8d574ff7883ad99d3d1dd980a12603 (patch)
tree37270a5091ae25524a6494aeb1b3bce1df94b584 /utils/statd
parentd56192a1e4ddb962f961721b1c5d094696b2d206 (diff)
downloadnfs-utils-b148d3414a8d574ff7883ad99d3d1dd980a12603.tar.gz
nfs-utils-b148d3414a8d574ff7883ad99d3d1dd980a12603.tar.xz
nfs-utils-b148d3414a8d574ff7883ad99d3d1dd980a12603.zip
libnsm.a: Factor atomic write code out of nsm_get_state()
We're about to use the same logic (mktemp, write, rename) for other new purposes, so pull it out into its own function. This change also addresses a latent bug: O_TRUNC is now used when creating the temporary file. This eliminates the possibility of getting stale data in the temp file, if somehow a previous "atomic write" was interrupted and didn't remove the temporary file. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'utils/statd')
0 files changed, 0 insertions, 0 deletions