mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-09 01:18:39 +03:00
libdevmapper, dmeventd: be paranoid about detecting write failure
* dmeventd/dmeventd.c (_set_oom_adj): When writing to /proc/self/oom_adj, detect failure even if it's hidden behind ferror. [Using dm_fclose's extra ferror test here is probably not needed, since the amount written is nowhere near BUFSIZ, but use it regardless, for consistency. ] * lib/fs/libdevmapper.c (do_suspend): Detect fclose failure when writing to suspend.
This commit is contained in:
parent
b14b97599d
commit
6fa6ce35da
@ -1,6 +1,7 @@
|
||||
Version 1.02.22 -
|
||||
================================
|
||||
dm_fclose: new function
|
||||
libdevmapper, dmeventd: be paranoid about detecting write failure
|
||||
|
||||
Version 1.02.21 - 13th July 2007
|
||||
================================
|
||||
|
@ -1579,7 +1579,7 @@ static int _set_oom_adj(int val)
|
||||
}
|
||||
|
||||
fprintf(fp, "%i", val);
|
||||
if (fclose(fp))
|
||||
if (dm_fclose(fp))
|
||||
perror(OOM_ADJ_FILE ": fclose failed");
|
||||
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user