]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs: fix hang with BSD accounting on frozen filesystem
authorJan Kara <jack@suse.cz>
Tue, 26 Mar 2013 23:24:15 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:10:53 +0000 (17:10 +1100)
commit7e92c3bdbe288cd05e1cb4030dccc74ea1ecb815
treed48accd8a63256e44ed4f60ed694373cb6141c44
parentdafa37925e0031e0d831ae268cb18dbc70c2524f
fs: fix hang with BSD accounting on frozen filesystem

When BSD process accounting is enabled and logs information to a
filesystem which gets frozen, system easily becomes unusable because each
attempt to account process information blocks.  Thus e.g.  every task gets
blocked in exit.

It seems better to drop accounting information (which can already happen
when filesystem is running out of space) instead of locking system up.  So
we open the accounting file with O_NONBLOCK.

Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/acct.c