Commit 2d849bd1 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (2/7) kdev_t removals

* all remaining callers of sync_inodes() and sync_supers() pass
  NODEV as an argument, so we can make them void(void).  Dead
  code removed.
parent 7155112c
...@@ -368,9 +368,9 @@ asmlinkage long sys_sync(void) ...@@ -368,9 +368,9 @@ asmlinkage long sys_sync(void)
sync_buffers(NODEV, 0); sync_buffers(NODEV, 0);
lock_kernel(); lock_kernel();
sync_inodes(NODEV); sync_inodes();
DQUOT_SYNC(NULL); DQUOT_SYNC(NULL);
sync_supers(NODEV); sync_supers();
unlock_kernel(); unlock_kernel();
sync_buffers(NODEV, 1); sync_buffers(NODEV, 1);
...@@ -2617,7 +2617,7 @@ static int sync_old_buffers(void) ...@@ -2617,7 +2617,7 @@ static int sync_old_buffers(void)
{ {
lock_kernel(); lock_kernel();
sync_unlocked_inodes(); sync_unlocked_inodes();
sync_supers(NODEV); sync_supers();
unlock_kernel(); unlock_kernel();
for (;;) { for (;;) {
......
...@@ -419,23 +419,15 @@ static struct super_block *get_super_to_sync(void) ...@@ -419,23 +419,15 @@ static struct super_block *get_super_to_sync(void)
* writes them out, and puts them back on the normal list. * writes them out, and puts them back on the normal list.
*/ */
void sync_inodes(kdev_t dev) void sync_inodes(void)
{ {
struct super_block * s; struct super_block * s;
/* /*
* Search the super_blocks array for the device(s) to sync. * Search the super_blocks array for the device(s) to sync.
*/ */
if (!kdev_none(dev)) { while ((s = get_super_to_sync()) != NULL) {
if ((s = get_super(dev)) != NULL) { sync_inodes_sb(s);
sync_inodes_sb(s); drop_super(s);
drop_super(s);
}
} else {
while ((s = get_super_to_sync()) != NULL) {
sync_inodes_sb(s);
drop_super(s);
}
} }
} }
......
...@@ -499,19 +499,9 @@ static inline void write_super(struct super_block *sb) ...@@ -499,19 +499,9 @@ static inline void write_super(struct super_block *sb)
* hold up the sync while mounting a device. (The newly * hold up the sync while mounting a device. (The newly
* mounted device won't need syncing.) * mounted device won't need syncing.)
*/ */
void sync_supers(kdev_t dev) void sync_supers(void)
{ {
struct super_block * sb; struct super_block * sb;
if (!kdev_none(dev)) {
sb = get_super(dev);
if (sb) {
if (sb->s_dirt)
write_super(sb);
drop_super(sb);
}
return;
}
restart: restart:
spin_lock(&sb_lock); spin_lock(&sb_lock);
sb = sb_entry(super_blocks.next); sb = sb_entry(super_blocks.next);
......
...@@ -1212,7 +1212,7 @@ extern void invalidate_inode_buffers(struct inode *); ...@@ -1212,7 +1212,7 @@ extern void invalidate_inode_buffers(struct inode *);
#define destroy_buffers(dev) __invalidate_buffers((dev), 1) #define destroy_buffers(dev) __invalidate_buffers((dev), 1)
extern void invalidate_bdev(struct block_device *, int); extern void invalidate_bdev(struct block_device *, int);
extern void __invalidate_buffers(kdev_t dev, int); extern void __invalidate_buffers(kdev_t dev, int);
extern void sync_inodes(kdev_t); extern void sync_inodes(void);
extern void sync_unlocked_inodes(void); extern void sync_unlocked_inodes(void);
extern void write_inode_now(struct inode *, int); extern void write_inode_now(struct inode *, int);
extern int sync_buffers(kdev_t, int); extern int sync_buffers(kdev_t, int);
...@@ -1234,7 +1234,7 @@ static inline int fsync_inode_data_buffers(struct inode *inode) ...@@ -1234,7 +1234,7 @@ static inline int fsync_inode_data_buffers(struct inode *inode)
extern int inode_has_buffers(struct inode *); extern int inode_has_buffers(struct inode *);
extern int filemap_fdatasync(struct address_space *); extern int filemap_fdatasync(struct address_space *);
extern int filemap_fdatawait(struct address_space *); extern int filemap_fdatawait(struct address_space *);
extern void sync_supers(kdev_t); extern void sync_supers(void);
extern int bmap(struct inode *, int); extern int bmap(struct inode *, int);
extern int notify_change(struct dentry *, struct iattr *); extern int notify_change(struct dentry *, struct iattr *);
extern int permission(struct inode *, int); extern int permission(struct inode *, int);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment