mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
quota: move remount handling into the filesystem
Currently do_remount_sb calls into the dquot code to tell it about going from rw to ro and ro to rw. Move this code into the filesystem to not depend on the dquot code in the VFS - note ocfs2 already ignores these calls and handles remount by itself. This gets rid of overloading the quotactl calls and allows to unify the VFS and XFS codepaths in that area later. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
This commit is contained in:
parent
eea7feb072
commit
c79d967de3
8 changed files with 84 additions and 14 deletions
|
|
@ -396,10 +396,20 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data)
|
|||
|
||||
JFS_SBI(sb)->flag = flag;
|
||||
ret = jfs_mount_rw(sb, 1);
|
||||
|
||||
/* mark the fs r/w for quota activity */
|
||||
sb->s_flags &= ~MS_RDONLY;
|
||||
|
||||
unlock_kernel();
|
||||
vfs_dq_quota_on_remount(sb);
|
||||
return ret;
|
||||
}
|
||||
if ((!(sb->s_flags & MS_RDONLY)) && (*flags & MS_RDONLY)) {
|
||||
rc = vfs_dq_off(sb, 1);
|
||||
if (rc < 0 && rc != -ENOSYS) {
|
||||
unlock_kernel();
|
||||
return -EBUSY;
|
||||
}
|
||||
rc = jfs_umount_rw(sb);
|
||||
JFS_SBI(sb)->flag = flag;
|
||||
unlock_kernel();
|
||||
|
|
|
|||
Loading…
Reference in a new issue