Commit 7e775f46a125f894a1d71e96797c776dbec161f0
Committed by
Linus Torvalds
1 parent
d643a49ae1
Exists in
master
and in
16 other branches
fs/pipe.c: skip file_update_time on frozen fs
Pipe has no data associated with fs so it is not good idea to block pipe_write() if FS is frozen, but we can not update file's time on such filesystem. Let's use same idea as we use in touch_time(). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=65701 Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
fs/pipe.c
... | ... | @@ -663,10 +663,11 @@ |
663 | 663 | wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM); |
664 | 664 | kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); |
665 | 665 | } |
666 | - if (ret > 0) { | |
666 | + if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) { | |
667 | 667 | int err = file_update_time(filp); |
668 | 668 | if (err) |
669 | 669 | ret = err; |
670 | + sb_end_write(file_inode(filp)->i_sb); | |
670 | 671 | } |
671 | 672 | return ret; |
672 | 673 | } |