Skip to content

Commit e1740a4

Browse files
author
Al Viro
committed
switch ext2 to simple_fsync()
kill ext2_sync_file() (along with ext2/fsync.c), get rid of ext2_update_inode() - it's an alias of ext2_write_inode(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b522412 commit e1740a4

6 files changed

Lines changed: 6 additions & 66 deletions

File tree

‎fs/ext2/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
obj-$(CONFIG_EXT2_FS) += ext2.o
66

7-
ext2-y := balloc.o dir.o file.o fsync.o ialloc.o inode.o \
7+
ext2-y := balloc.o dir.o file.o ialloc.o inode.o \
88
ioctl.o namei.o super.o symlink.o
99

1010
ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o

‎fs/ext2/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,5 +720,5 @@ const struct file_operations ext2_dir_operations = {
720720
#ifdef CONFIG_COMPAT
721721
.compat_ioctl = ext2_compat_ioctl,
722722
#endif
723-
.fsync = ext2_sync_file,
723+
.fsync = simple_fsync,
724724
};

‎fs/ext2/ext2.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ extern int ext2_empty_dir (struct inode *);
113113
extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);
114114
extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *);
115115

116-
/* fsync.c */
117-
extern int ext2_sync_file (struct file *, struct dentry *, int);
118-
119116
/* ialloc.c */
120117
extern struct inode * ext2_new_inode (struct inode *, int);
121118
extern void ext2_free_inode (struct inode *);

‎fs/ext2/file.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const struct file_operations ext2_file_operations = {
5555
.mmap = generic_file_mmap,
5656
.open = generic_file_open,
5757
.release = ext2_release_file,
58-
.fsync = ext2_sync_file,
58+
.fsync = simple_fsync,
5959
.splice_read = generic_file_splice_read,
6060
.splice_write = generic_file_splice_write,
6161
};
@@ -72,7 +72,7 @@ const struct file_operations ext2_xip_file_operations = {
7272
.mmap = xip_file_mmap,
7373
.open = generic_file_open,
7474
.release = ext2_release_file,
75-
.fsync = ext2_sync_file,
75+
.fsync = simple_fsync,
7676
};
7777
#endif
7878

‎fs/ext2/fsync.c‎

Lines changed: 0 additions & 50 deletions
This file was deleted.

‎fs/ext2/inode.c‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ MODULE_AUTHOR("Remy Card and others");
4141
MODULE_DESCRIPTION("Second Extended Filesystem");
4242
MODULE_LICENSE("GPL");
4343

44-
static int ext2_update_inode(struct inode * inode, int do_sync);
45-
4644
/*
4745
* Test whether an inode is a fast symlink.
4846
*/
@@ -66,7 +64,7 @@ void ext2_delete_inode (struct inode * inode)
6664
goto no_delete;
6765
EXT2_I(inode)->i_dtime = get_seconds();
6866
mark_inode_dirty(inode);
69-
ext2_update_inode(inode, inode_needs_sync(inode));
67+
ext2_write_inode(inode, inode_needs_sync(inode));
7068

7169
inode->i_size = 0;
7270
if (inode->i_blocks)
@@ -1337,7 +1335,7 @@ struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
13371335
return ERR_PTR(ret);
13381336
}
13391337

1340-
static int ext2_update_inode(struct inode * inode, int do_sync)
1338+
int ext2_write_inode(struct inode *inode, int do_sync)
13411339
{
13421340
struct ext2_inode_info *ei = EXT2_I(inode);
13431341
struct super_block *sb = inode->i_sb;
@@ -1442,11 +1440,6 @@ static int ext2_update_inode(struct inode * inode, int do_sync)
14421440
return err;
14431441
}
14441442

1445-
int ext2_write_inode(struct inode *inode, int wait)
1446-
{
1447-
return ext2_update_inode(inode, wait);
1448-
}
1449-
14501443
int ext2_sync_inode(struct inode *inode)
14511444
{
14521445
struct writeback_control wbc = {

0 commit comments

Comments
 (0)