Skip to content

Commit

Permalink
UBIFS: use ro_mount instead of MS_RDONLY
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed May 13, 2011
1 parent 1a29af8 commit 3b2f9a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/ubifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 3b2f9a0

Please sign in to comment.