Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755393AbbLXKIl (ORCPT ); Thu, 24 Dec 2015 05:08:41 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:46429 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755352AbbLXKIj (ORCPT ); Thu, 24 Dec 2015 05:08:39 -0500 X-AuditID: cbfee61b-f793c6d00000236c-02-567bc4268c8f From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] f2fs: report readonly status in ->fsync Date: Thu, 24 Dec 2015 18:07:25 +0800 Message-id: <016601d13e33$0ecdfd50$2c69f7f0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdE+MpQuT6VvQtg6TPicozwipix55Q== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsVy+t9jQV21I9VhBhcmaFk8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDLOzdzCXLCYpeLevgamBsZd zF2MnBwSAiYSK1fuZ4KwxSQu3FvP1sXIxSEkMItRYs6DT1DOK0aJXZsXg3WwCahILO/4D9Yh AmQfWnSZHcRmFvCQaOz4zgpiCwvYSFw/3glmswioShyY+pcNxOYVsJR4se0eI4QtKPFj8j0W iF4tifU7jzNB2PISm9e8hbpOQWLH2deMELv0JPq2fYTaJS6x8cgtlgmMQGcijJqFZNQsJKNm IWlZwMiyilEitSC5oDgpPdcoL7Vcrzgxt7g0L10vOT93EyM4jJ9J72A8vMv9EKMAB6MSD2/h naowIdbEsuLK3EOMEhzMSiK8n/ZVhwnxpiRWVqUW5ccXleakFh9ilOZgURLn3XcpMkxIID2x JDU7NbUgtQgmy8TBKdXAGNuoyzN7v1/ChSyFIwkCy25t1Dg7RbBFef+TEOkpvLa2AmdZooVW PHzgWxs8i+MRhz4/4/wUo6sSW91Pem2/kfGnYk89s3H7PvXydU4uLP4Rvg+bVnxg/Kvm9cjC INrg2uWHn8WfKawvZHj+332BVSFHo0xUY/YzlRPPPV/onsy+Zprz9JiJEktxRqKhFnNRcSIA ohww7V8CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 768 Lines: 29 Report readonly status of filesystem during fsync. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 2d87a3c..a60d088 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -197,7 +197,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) }; if (unlikely(f2fs_readonly(inode->i_sb))) - return 0; + return -EROFS; trace_f2fs_sync_file_enter(inode); -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/