]> 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 Feb 2013 02:13:56 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:18 +0000 (16:52 +1100)
commitbac37da448ce96d55ec65e978d03f3563845e979
tree8cb30326aed5aa36cf19ca38a6bc2f08bc3dbe43
parentedabb6a170434dc59031db3a3476ac1659c17640
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