From: Artem Bityutskiy Date: Thu, 21 Apr 2011 12:11:33 +0000 (+0300) Subject: UBIFS: use ro_mount instead of MS_RDONLY X-Git-Tag: 2.1b_release~4132^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b2f9a019e655f3407e4e69cdbaf8b75699b79a4;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git UBIFS: use ro_mount instead of MS_RDONLY We have our own flags indicating R/O mode, and c->ro_mode is equivalent to MS_RDONLY. Let's be consistent and use UBIFS flags everywhere. This patch is just a minor cleanup. Additionally, add a comment that we are surprised with VFS behavior - as a reminder to look at this some day. Signed-off-by: Artem Bityutskiy --- diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 3594aae..adce3b7 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1312,7 +1312,11 @@ int ubifs_fsync(struct file *file, int datasync) dbg_gen("syncing inode %lu", inode->i_ino); - if (inode->i_sb->s_flags & MS_RDONLY) + if (c->ro_mount) + /* + * For some really strange reasons VFS does not filter out + * 'fsync()' for R/O mounted file-systems as per 2.6.39. + */ return 0; /*