All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly.patch removed from -mm tree
@ 2014-02-11 19:23 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-02-11 19:23 UTC (permalink / raw)
  To: mm-commits, mfasheh, jlbec, younger.liucn

Subject: [merged] ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly.patch removed from -mm tree
To: younger.liucn@gmail.com,jlbec@evilplan.org,mfasheh@suse.com,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
Date: Tue, 11 Feb 2014 11:23:38 -0800


The patch titled
     Subject: ocfs2: fix ocfs2_sync_file() if filesystem is readonly
has been removed from the -mm tree.  Its filename was
     ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Younger Liu <younger.liucn@gmail.com>
Subject: ocfs2: fix ocfs2_sync_file() if filesystem is readonly

If filesystem is readonly, there is no need to flush drive's caches or
force any uncommitted transactions.

[akpm@linux-foundation.org: return -EROFS, not 0]
Signed-off-by: Younger Liu <younger.liucn@gmail.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ocfs2/file.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN fs/ocfs2/file.c~ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly fs/ocfs2/file.c
--- a/fs/ocfs2/file.c~ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly
+++ a/fs/ocfs2/file.c
@@ -185,6 +185,9 @@ static int ocfs2_sync_file(struct file *
 			      file->f_path.dentry->d_name.name,
 			      (unsigned long long)datasync);
 
+	if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb))
+		return -EROFS;
+
 	err = filemap_write_and_wait_range(inode->i_mapping, start, end);
 	if (err)
 		return err;
_

Patches currently in -mm which might be from younger.liucn@gmail.com are

origin.patch


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

only message in thread, other threads:[~2014-02-11 19:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 19:23 [merged] ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly.patch removed from -mm tree akpm

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.