Message ID | 1456287921-8961-1-git-send-email-zhangaihua1@huawei.com |
---|---|
State | New, archived |
Headers | show |
Hi zhangaihua,
[auto build test ERROR on ext4/dev]
[also build test ERROR on v4.5-rc5 next-20160223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/zhangaihua1-huawei-com/fix-waring-calltrace-when-usb-was-ejected/20160224-122520
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: i386-tinyconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
fs/built-in.o: In function `__mark_inode_dirty':
>> (.text+0x167f9): undefined reference to `block_device_ejected'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi zhangaihua, [auto build test ERROR on ext4/dev] [also build test ERROR on v4.5-rc5 next-20160223] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/zhangaihua1-huawei-com/fix-waring-calltrace-when-usb-was-ejected/20160224-122520 base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev config: blackfin-BF561-EZKIT-SMP_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=blackfin All errors (new ones prefixed by >>): fs/built-in.o: In function `_mark_inode_dirty': >> fs/fs-writeback.c:1988: undefined reference to `block_device_ejected' vim +1988 fs/fs-writeback.c 1982 void __mark_inode_dirty(struct inode *inode, int flags) 1983 { 1984 #define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC) 1985 struct super_block *sb = inode->i_sb; 1986 int dirtytime; 1987 > 1988 if (block_device_ejected(sb)) 1989 return; 1990 1991 trace_writeback_mark_inode_dirty(inode, flags); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi zhangaihua,
[auto build test ERROR on ext4/dev]
[also build test ERROR on v4.5-rc5 next-20160223]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/zhangaihua1-huawei-com/fix-waring-calltrace-when-usb-was-ejected/20160224-122520
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: arm-allnoconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm
All errors (new ones prefixed by >>):
fs/built-in.o: In function `__mark_inode_dirty':
>> :(.text+0x14ac2): undefined reference to `block_device_ejected'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3ed01ec..15d9c4e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -354,13 +354,14 @@ static void save_error_info(struct super_block *sb, const char *func, * This is a kludge to prevent these oops until we can put in a proper * hook in del_gendisk() to inform the VFS and file system layers. */ -static int block_device_ejected(struct super_block *sb) +int block_device_ejected(struct super_block *sb) { struct inode *bd_inode = sb->s_bdev->bd_inode; struct backing_dev_info *bdi = inode_to_bdi(bd_inode); return bdi->dev == NULL; } +EXPORT_SYMBOL(block_device_ejected); static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn) { diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 6915c95..66b1941 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1985,6 +1985,9 @@ void __mark_inode_dirty(struct inode *inode, int flags) struct super_block *sb = inode->i_sb; int dirtytime; + if (block_device_ejected(sb)) + return; + trace_writeback_mark_inode_dirty(inode, flags); /* diff --git a/include/linux/fs.h b/include/linux/fs.h index ae68100..0c40338 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3075,6 +3075,8 @@ static inline bool dir_relax(struct inode *inode) return !IS_DEADDIR(inode); } +int block_device_ejected(struct super_block *sb); + extern bool path_noexec(const struct path *path); extern void inode_nohighmem(struct inode *inode);