All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
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	[thread overview]
Message-ID: <016601d13e33$0ecdfd50$2c69f7f0$@samsung.com> (raw)

Report readonly status of filesystem during fsync.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
 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

             reply	other threads:[~2015-12-24 10:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 10:07 Chao Yu [this message]
2015-12-26  6:32 ` [PATCH 3/5] f2fs: report readonly status in ->fsync Marc Lehmann
2015-12-28  9:59   ` Chao Yu
2015-12-28 22:43     ` Jaegeuk Kim
2015-12-29  6:21       ` Chao Yu
2015-12-30  0:32         ` Jaegeuk Kim
2015-12-30  6:46           ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='016601d13e33$0ecdfd50$2c69f7f0$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.