{
struct super_block *sb = get_super(bdev);
if (sb) {
- int res = fsync_super(sb);
+ int res = sync_filesystem(sb);
drop_super(sb);
return res;
}
sb->s_frozen = SB_FREEZE_WRITE;
smp_wmb();
- fsync_super(sb);
+ sync_filesystem(sb);
sb->s_frozen = SB_FREEZE_TRANS;
smp_wmb();
/* make sure all pages pinned by operations on behalf of the netfs are
* written to disc */
cachefiles_begin_secure(cache, &saved_cred);
- ret = fsync_super(cache->mnt->mnt_sb);
+ ret = sync_filesystem(cache->mnt->mnt_sb);
cachefiles_end_secure(cache, saved_cred);
if (ret == -EIO)
#include <linux/blkdev.h>
#include <linux/quotaops.h>
#include <linux/namei.h>
-#include <linux/buffer_head.h> /* for fsync_super() */
#include <linux/mount.h>
#include <linux/security.h>
#include <linux/syscalls.h>
if (sb->s_root) {
shrink_dcache_for_umount(sb);
- fsync_super(sb);
+ sync_filesystem(sb);
lock_super(sb);
sb->s_flags &= ~MS_ACTIVE;
if (flags & MS_RDONLY)
acct_auto_close(sb);
shrink_dcache_sb(sb);
- fsync_super(sb);
+ sync_filesystem(sb);
/* If we are remounting RDONLY and current sb is read/write,
make sure there are no rw files opened */
* case write_inode() functions do sync_dirty_buffer() and thus effectively
* write one block at a time.
*/
-static int __fsync_super(struct super_block *sb, int wait)
+static int __sync_filesystem(struct super_block *sb, int wait)
{
vfs_dq_sync(sb);
sync_inodes_sb(sb, wait);
* superblock. Filesystem data as well as the underlying block
* device. Takes the superblock lock.
*/
-int fsync_super(struct super_block *sb)
+int sync_filesystem(struct super_block *sb)
{
int ret;
- ret = __fsync_super(sb, 0);
+ ret = __sync_filesystem(sb, 0);
if (ret < 0)
return ret;
- return __fsync_super(sb, 1);
+ return __sync_filesystem(sb, 1);
}
-EXPORT_SYMBOL_GPL(fsync_super);
+EXPORT_SYMBOL_GPL(sync_filesystem);
/*
* Sync all the data for all the filesystems (called by sys_sync() and
spin_unlock(&sb_lock);
down_read(&sb->s_umount);
if (sb->s_root)
- __fsync_super(sb, wait);
+ __sync_filesystem(sb, wait);
up_read(&sb->s_umount);
/* restart only when sb is no longer on the list */
spin_lock(&sb_lock);
return 0;
}
#endif
-extern int fsync_super(struct super_block *);
+extern int sync_filesystem(struct super_block *);
extern const struct file_operations def_blk_fops;
extern const struct file_operations def_chr_fops;
extern const struct file_operations bad_sock_fops;