Subject: [nacked] ocfs2-fix-ocfs2_sync_file-if-filesystem-is-readonly.patch removed from -mm tree To: younger.liucn@xxxxxxxxx,jlbec@xxxxxxxxxxxx,mfasheh@xxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 24 Jan 2014 14:13:34 -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 nacked ------------------------------------------------------ From: Younger Liu <younger.liucn@xxxxxxxxx> 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. Signed-off-by: Younger Liu <younger.liucn@xxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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 0; + 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@xxxxxxxxx are origin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html