Commit 429479f031322a0cc5c921ffb2321a51718dc875
Committed by
Al Viro
1 parent
bfe881255c
Exists in
master
and in
7 other branches
vfs: Make __fsync_super() a static function (version 4)
__fsync_super() does the same thing as fsync_super(). So change the only caller to use fsync_super() and make __fsync_super() static. This removes unnecessarily duplicated call to sync_blockdev() and prepares ground for the changes to __fsync_super() in the following patches. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 3 changed files with 4 additions and 6 deletions Side-by-side Diff
fs/block_dev.c
fs/super.c
... | ... | @@ -289,7 +289,7 @@ |
289 | 289 | * device. Takes the superblock lock. Requires a second blkdev |
290 | 290 | * flush by the caller to complete the operation. |
291 | 291 | */ |
292 | -void __fsync_super(struct super_block *sb) | |
292 | +static int __fsync_super(struct super_block *sb) | |
293 | 293 | { |
294 | 294 | sync_inodes_sb(sb, 0); |
295 | 295 | vfs_dq_sync(sb); |
... | ... | @@ -300,7 +300,7 @@ |
300 | 300 | unlock_super(sb); |
301 | 301 | if (sb->s_op->sync_fs) |
302 | 302 | sb->s_op->sync_fs(sb, 1); |
303 | - sync_blockdev(sb->s_bdev); | |
303 | + return sync_blockdev(sb->s_bdev); | |
304 | 304 | } |
305 | 305 | |
306 | 306 | /* |
... | ... | @@ -310,8 +310,7 @@ |
310 | 310 | */ |
311 | 311 | int fsync_super(struct super_block *sb) |
312 | 312 | { |
313 | - __fsync_super(sb); | |
314 | - return sync_blockdev(sb->s_bdev); | |
313 | + return __fsync_super(sb); | |
315 | 314 | } |
316 | 315 | EXPORT_SYMBOL_GPL(fsync_super); |
317 | 316 |
include/linux/fs.h
... | ... | @@ -2078,7 +2078,6 @@ |
2078 | 2078 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); |
2079 | 2079 | extern void sync_supers(void); |
2080 | 2080 | extern void sync_filesystems(int wait); |
2081 | -extern void __fsync_super(struct super_block *sb); | |
2082 | 2081 | extern void emergency_sync(void); |
2083 | 2082 | extern void emergency_remount(void); |
2084 | 2083 | extern int do_remount_sb(struct super_block *sb, int flags, |