aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/file.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-21 08:11:33 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-13 12:23:55 -0400
commit3b2f9a019e655f3407e4e69cdbaf8b75699b79a4 (patch)
tree6cb40aec6dd430b1af32a4d20ffbe346ea6b9b3f /fs/ubifs/file.c
parent1a29af8bd740b2720caeafbffece1c0be6a9d06d (diff)
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 <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/file.c')
-rw-r--r--fs/ubifs/file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 3594aae12a88..adce3b7b5a3e 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1312,7 +1312,11 @@ int ubifs_fsync(struct file *file, int datasync)
1312 1312
1313 dbg_gen("syncing inode %lu", inode->i_ino); 1313 dbg_gen("syncing inode %lu", inode->i_ino);
1314 1314
1315 if (inode->i_sb->s_flags & MS_RDONLY) 1315 if (c->ro_mount)
1316 /*
1317 * For some really strange reasons VFS does not filter out
1318 * 'fsync()' for R/O mounted file-systems as per 2.6.39.
1319 */
1316 return 0; 1320 return 0;
1317 1321
1318 /* 1322 /*