]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fs: return EAGAIN when O_NONBLOCK write should block on frozen fs
authorJan Kara <jack@suse.cz>
Wed, 20 Mar 2013 04:07:02 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:28:21 +0000 (16:28 +1100)
commita4a8c6dfbd703c0be8587efb2f5ff29245160d42
tree76686bc0e8c2486d25e099367238f41273c9c724
parentad1a9dd521515d2aa8022efca064b956f178e23e
fs: return EAGAIN when O_NONBLOCK write should block on frozen fs

When user asks for O_NONBLOCK behavior for a file descriptor, return
EAGAIN instead of blocking on a frozen filesystem.

This is needed so we can fix a hang with BSD accounting on frozen
filesystems.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/btrfs/file.c
fs/cifs/file.c
fs/fuse/file.c
fs/ntfs/file.c
fs/ocfs2/file.c
fs/splice.c
fs/xfs/xfs_file.c
include/linux/fs.h
mm/filemap.c