@@ -103,7 +103,7 @@ static void destroy_inodecache(void)
static int ncp_remount(struct super_block *sb, int *flags, char* data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NODIRATIME;
return 0;
}
@@ -212,7 +212,7 @@ static int parse_options(struct super_block *sb, char *options)
static int adfs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NODIRATIME;
return parse_options(sb, data);
}
@@ -570,7 +570,7 @@ affs_remount(struct super_block *sb, int *flags, char *data)
pr_debug("%s(flags=0x%x,opts=\"%s\")\n", __func__, *flags, data);
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NODIRATIME;
memcpy(volume, sbi->s_volume, 32);
@@ -951,7 +951,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
static int
befs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (!(*flags & SB_RDONLY))
return -EINVAL;
return 0;
@@ -468,7 +468,7 @@ int fsync_bdev(struct block_device *bdev)
{
struct super_block *sb = get_super(bdev);
if (sb) {
- int res = sync_filesystem(sb);
+ int res = sync_filesystem(sb, NULL);
drop_super(sb);
return res;
}
@@ -1732,7 +1732,7 @@ static inline void btrfs_remount_begin(struct btrfs_fs_info *fs_info,
wait_event(fs_info->transaction_wait,
(atomic_read(&fs_info->defrag_running) == 0));
if (flags & SB_RDONLY)
- sync_filesystem(fs_info->sb);
+ sync_filesystem(fs_info->sb, NULL);
}
}
@@ -1763,7 +1763,7 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
u32 old_metadata_ratio = fs_info->metadata_ratio;
int ret;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
btrfs_remount_prepare(fs_info);
if (data) {
@@ -391,7 +391,7 @@ static void cachefiles_sync_cache(struct fscache_cache *_cache)
* written to disc */
cachefiles_begin_secure(cache, &saved_cred);
down_read(&cache->mnt->mnt_sb->s_umount);
- ret = sync_filesystem(cache->mnt->mnt_sb);
+ ret = sync_filesystem(cache->mnt->mnt_sb, NULL);
up_read(&cache->mnt->mnt_sb->s_umount);
cachefiles_end_secure(cache, saved_cred);
@@ -574,7 +574,7 @@ static int cifs_show_stats(struct seq_file *s, struct dentry *root)
static int cifs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NODIRATIME;
return 0;
}
@@ -95,7 +95,7 @@ void coda_destroy_inodecache(void)
static int coda_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NOATIME;
return 0;
}
@@ -504,7 +504,7 @@ static void cramfs_kill_sb(struct super_block *sb)
static int cramfs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_RDONLY;
return 0;
}
@@ -135,7 +135,7 @@ static int debugfs_remount(struct super_block *sb, int *flags, char *data)
int err;
struct debugfs_fs_info *fsi = sb->s_fs_info;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
err = debugfs_parse_options(data, &fsi->mount_opts);
if (err)
goto fail;
@@ -115,7 +115,7 @@ static void destroy_inodecache(void)
static int efs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_RDONLY;
return 0;
}
@@ -1326,7 +1326,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
struct ext2_mount_options new_opts;
int err;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
spin_lock(&sbi->s_lock);
new_opts.s_mount_opt = sbi->s_mount_opt;
@@ -5094,7 +5094,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
}
if (*flags & SB_RDONLY) {
- err = sync_filesystem(sb);
+ err = sync_filesystem(sb, NULL);
if (err < 0)
goto restore_opts;
err = dquot_suspend(sb, -1);
@@ -5590,7 +5590,7 @@ static int ext4_quota_off(struct super_block *sb, int type)
/* Force all delayed allocation blocks to be allocated.
* Caller already holds s_umount sem */
if (test_opt(sb, DELALLOC))
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (!inode || !igrab(inode))
goto out;
@@ -784,7 +784,7 @@ static int fat_remount(struct super_block *sb, int *flags, char *data)
struct msdos_sb_info *sbi = MSDOS_SB(sb);
*flags |= SB_NODIRATIME | (sbi->options.isvfat ? 0 : SB_NOATIME);
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
/* make sure we update state on remount. */
new_rdonly = *flags & SB_RDONLY;
@@ -115,7 +115,7 @@ vxfs_statfs(struct dentry *dentry, struct kstatfs *bufp)
static int vxfs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_RDONLY;
return 0;
}
@@ -140,7 +140,7 @@ static void fuse_evict_inode(struct inode *inode)
static int fuse_remount_fs(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (*flags & SB_MANDLOCK)
return -EINVAL;
@@ -1241,7 +1241,7 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
struct gfs2_tune *gt = &sdp->sd_tune;
int error;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
spin_lock(>->gt_spin);
args.ar_commit = gt->gt_logd_secs;
@@ -113,7 +113,7 @@ static int hfs_statfs(struct dentry *dentry, struct kstatfs *buf)
static int hfs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NODIRATIME;
if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
return 0;
@@ -328,7 +328,7 @@ static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf)
static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
return 0;
if (!(*flags & SB_RDONLY)) {
@@ -454,7 +454,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
int o;
struct hpfs_sb_info *sbi = hpfs_sb(s);
- sync_filesystem(s);
+ sync_filesystem(s, NULL);
*flags |= SB_NOATIME;
@@ -113,7 +113,7 @@ static void destroy_inodecache(void)
static int isofs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (!(*flags & SB_RDONLY))
return -EROFS;
return 0;
@@ -243,7 +243,7 @@ static int jffs2_remount_fs(struct super_block *sb, int *flags, char *data)
struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
int err;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
err = jffs2_parse_options(c, data);
if (err)
return -EINVAL;
@@ -463,7 +463,7 @@ static int jfs_remount(struct super_block *sb, int *flags, char *data)
int flag = JFS_SBI(sb)->flag;
int ret;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (!parse_options(data, sb, &newLVSize, &flag))
return -EINVAL;
@@ -123,7 +123,7 @@ static int minix_remount (struct super_block * sb, int * flags, char * data)
struct minix_sb_info * sbi = minix_sb(sb);
struct minix_super_block * ms;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
ms = sbi->s_ms;
if ((bool)(*flags & SB_RDONLY) == sb_rdonly(sb))
return 0;
@@ -2252,7 +2252,7 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data)
struct nfs4_mount_data *options4 = (struct nfs4_mount_data *)raw_data;
u32 nfsvers = nfss->nfs_client->rpc_ops->version;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
/*
* Userspace mount programs that send binary options generally send
@@ -1126,7 +1126,7 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)
unsigned long old_mount_opt;
int err;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
old_sb_flags = sb->s_flags;
old_mount_opt = nilfs->ns_mount_opt;
@@ -469,7 +469,7 @@ static int ntfs_remount(struct super_block *sb, int *flags, char *opt)
ntfs_debug("Entering with remount options string: %s", opt);
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
#ifndef NTFS_RW
/* For read-only compiled driver, enforce read-only flag. */
@@ -641,7 +641,7 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data)
struct ocfs2_super *osb = OCFS2_SB(sb);
u32 tmp;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (!ocfs2_parse_options(sb, data, &parsed_options, 1) ||
!ocfs2_check_set_options(sb, &parsed_options)) {
@@ -368,7 +368,7 @@ static struct inode *openprom_iget(struct super_block *sb, ino_t ino)
static int openprom_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_NOATIME;
return 0;
}
@@ -289,7 +289,7 @@ static int ovl_sync_fs(struct super_block *sb, int wait, errseq_t *since)
upper_sb = ofs->upper_mnt->mnt_sb;
down_read(&upper_sb->s_umount);
- ret = sync_filesystem(upper_sb);
+ ret = sync_filesystem(upper_sb, NULL);
up_read(&upper_sb->s_umount);
return ret;
@@ -82,7 +82,7 @@ int proc_remount(struct super_block *sb, int *flags, char *data)
{
struct pid_namespace *pid = sb->s_fs_info;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
return !proc_parse_options(data, pid);
}
@@ -273,7 +273,7 @@ static int pstore_show_options(struct seq_file *m, struct dentry *root)
static int pstore_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
parse_options(data);
return 0;
@@ -44,7 +44,7 @@ static int qnx4_remount(struct super_block *sb, int *flags, char *data)
{
struct qnx4_sb_info *qs;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
qs = qnx4_sb(sb);
qs->Version = QNX4_VERSION;
*flags |= SB_RDONLY;
@@ -55,7 +55,7 @@ static int qnx6_show_options(struct seq_file *seq, struct dentry *root)
static int qnx6_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_RDONLY;
return 0;
}
@@ -2340,7 +2340,7 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id,
* the quota file since if blocksize < pagesize, invalidation
* of the cache could fail because of other unrelated dirty
* data */
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
invalidate_bdev(sb->s_bdev);
}
@@ -1454,7 +1454,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)
if (arg && !new_opts)
return -ENOMEM;
- sync_filesystem(s);
+ sync_filesystem(s, NULL);
reiserfs_write_lock(s);
#ifdef CONFIG_QUOTA
@@ -450,7 +450,7 @@ static int romfs_statfs(struct dentry *dentry, struct kstatfs *buf)
*/
static int romfs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_RDONLY;
return 0;
}
@@ -372,7 +372,7 @@ static int squashfs_statfs(struct dentry *dentry, struct kstatfs *buf)
static int squashfs_remount(struct super_block *sb, int *flags, char *data)
{
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
*flags |= SB_RDONLY;
return 0;
}
@@ -426,7 +426,7 @@ void generic_shutdown_super(struct super_block *sb)
if (sb->s_root) {
shrink_dcache_for_umount(sb);
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
sb->s_flags &= ~SB_ACTIVE;
fsnotify_unmount_inodes(sb);
@@ -1466,7 +1466,7 @@ int freeze_super(struct super_block *sb)
sb_wait_write(sb, SB_FREEZE_PAGEFAULT);
/* All writers are done so after syncing there won't be dirty data */
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
/* Now wait for internal filesystem counter */
sb->s_writers.frozen = SB_FREEZE_FS;
@@ -43,7 +43,7 @@ static int __sync_filesystem(struct super_block *sb, int wait)
* superblock. Filesystem data as well as the underlying block
* device. Takes the superblock lock.
*/
-int sync_filesystem(struct super_block *sb)
+int sync_filesystem(struct super_block *sb, errseq_t *since)
{
int ret;
@@ -169,7 +169,7 @@ SYSCALL_DEFINE1(syncfs, int, fd)
sb = f.file->f_path.dentry->d_sb;
down_read(&sb->s_umount);
- ret = sync_filesystem(sb);
+ ret = sync_filesystem(sb, NULL);
up_read(&sb->s_umount);
fdput(f);
@@ -60,7 +60,7 @@ static int sysv_remount(struct super_block *sb, int *flags, char *data)
{
struct sysv_sb_info *sbi = SYSV_SB(sb);
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (sbi->s_forced_ro)
*flags |= SB_RDONLY;
return 0;
@@ -230,7 +230,7 @@ static int tracefs_remount(struct super_block *sb, int *flags, char *data)
int err;
struct tracefs_fs_info *fsi = sb->s_fs_info;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
err = tracefs_parse_options(data, &fsi->mount_opts);
if (err)
goto fail;
@@ -1847,7 +1847,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
int err;
struct ubifs_info *c = sb->s_fs_info;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
dbg_gen("old flags %#lx, new flags %#x", sb->s_flags, *flags);
err = ubifs_parse_options(c, data, 1);
@@ -617,7 +617,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
int error = 0;
struct logicalVolIntegrityDescImpUse *lvidiu = udf_sb_lvidiu(sb);
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
if (lvidiu) {
int write_rev = le16_to_cpu(lvidiu->minUDFWriteRev);
if (write_rev > UDF_MAX_WRITE_VERSION && !(*flags & SB_RDONLY))
@@ -1303,7 +1303,7 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
unsigned new_mount_opt, ufstype;
unsigned flags;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
mutex_lock(&UFS_SB(sb)->s_lock);
uspi = UFS_SB(sb)->s_uspi;
flags = UFS_SB(sb)->s_flags;
@@ -1282,7 +1282,7 @@ xfs_fs_remount(
if (error)
return error;
- sync_filesystem(sb);
+ sync_filesystem(sb, NULL);
while ((p = strsep(&options, ",")) != NULL) {
int token;
@@ -2491,7 +2491,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
return false;
}
#endif
-extern int sync_filesystem(struct super_block *);
+extern int sync_filesystem(struct super_block *, errseq_t *);
extern const struct file_operations def_blk_fops;
extern const struct file_operations def_chr_fops;