Skip to contentSkip to conversation

fs: sync_filesystem() not depend on BLOCK

PATCH In review Alexander Beregalov 2 participants 3 messages May 5, 2009 – May 6, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 fs: sync_filesystem() not depend on BLOCK

Fix this build error when CONFIG_BLOCK is not set:
fs/super.c: In function 'generic_shutdown_super':
fs/super.c:278: error: implicit declaration of function 'sync_filesystem'

sync_filesystem() is always built with or without BLOCK.

---
 include/linux/fs.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
include/linux/fs.h +2 -1
index dee9745..efc991a 100644
@@ -1943,7 +1943,6 @@ extern struct super_block *freeze_bdev(struct block_device *);
 extern void emergency_thaw_all(void);
 extern int thaw_bdev(struct block_device *bdev, struct super_block *sb);
 extern int fsync_bdev(struct block_device *);
-extern int sync_filesystem(struct super_block *);
 extern int fsync_no_super(struct block_device *);
 #else
 static inline void bd_forget(struct inode *inode) {}
@@ -1961,6 +1960,8 @@ static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb)
 	return 0;
 }
 #endif
+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;
Signature · 1 line
1.6.2.3
#1 lore raw

PATCH 2/2 fs: define __sync_blockdev() when !BLOCK

Fix this build error when CONFIG_BLOCK is not set:
fs/sync.c: In function '__sync_filesystem':
fs/sync.c:40: error: implicit declaration of function '__sync_blockdev'

---
 include/linux/fs.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/fs.h +4 -0
index efc991a..4193cf0 100644
@@ -1947,6 +1947,10 @@ extern int fsync_no_super(struct block_device *);
 #else
 static inline void bd_forget(struct inode *inode) {}
 static inline int sync_blockdev(struct block_device *bdev) { return 0; }
+static inline int __sync_blockdev(struct block_device *bdev, int wait)
+{
+	return 0;
+}
 static inline void sync_blockdevs(void) { }
 static inline void invalidate_bdev(struct block_device *bdev) {}
 
Signature · 1 line
1.6.2.3