All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: return fake len for quota if cp is shutdown
@ 2018-07-29  6:11 Jaegeuk Kim
  0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2018-07-29  6:11 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

If cp is shutdown, let's just return success to unmount the partition.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/super.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index e0a828188f65..d56bc6eb8760 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1625,6 +1625,10 @@ static ssize_t f2fs_quota_write(struct super_block *sb, int type,
 	int tocopy;
 
 	while (towrite > 0) {
+
+		if (unlikely(f2fs_cp_error(F2FS_I_SB(inode))))
+			return len;
+
 		tocopy = min_t(unsigned long, sb->s_blocksize - offset,
 								towrite);
 retry:
-- 
2.17.0.441.gb46fe60e1d-goog


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-29  6:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-29  6:11 [PATCH] f2fs: return fake len for quota if cp is shutdown Jaegeuk Kim

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.