From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Monakhov Subject: [PATCH] pipe: skip file_update_time on frozen fs Date: Tue, 26 Nov 2013 11:59:07 +0400 Message-ID: <87txezmw50.fsf@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, Jan Kara To: Al Viro Return-path: Received: from mail-lb0-f175.google.com ([209.85.217.175]:53868 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752404Ab3KZH7L (ORCPT ); Tue, 26 Nov 2013 02:59:11 -0500 Received: by mail-lb0-f175.google.com with SMTP id x18so4040846lbi.20 for ; Mon, 25 Nov 2013 23:59:09 -0800 (PST) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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_atime(). https://bugzilla.kernel.org/show_bug.cgi?id=65701 Signed-off-by: Dmitry Monakhov Reviewed-by: Jan Kara --- fs/pipe.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index d2c45e1..a9acd9a 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -663,10 +663,11 @@ out: wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM); 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); if (err) ret = err; + sb_end_write(file_inode(filp)->i_sb); } return ret; } -- 1.7.1