Commit cf9d5808 authored by Dmitry Monakhov's avatar Dmitry Monakhov Committed by Jiri Slaby

fs/pipe.c: skip file_update_time on frozen fs

commit 7e775f46 upstream.

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=65701Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 3b86e790
...@@ -681,10 +681,11 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov, ...@@ -681,10 +681,11 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM); wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
} }
if (ret > 0) { if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
int err = file_update_time(filp); int err = file_update_time(filp);
if (err) if (err)
ret = err; ret = err;
sb_end_write(file_inode(filp)->i_sb);
} }
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment