07/03/21 01:19:39 E4OzVxjT
続き。ここで跳ねられてる? "pending delete"のファイルってlsofとかでも見れませんでしたっけ?
|----fs_may_remount_ro(struct super_block *sb) (fs/file_table.c)
|{
| struct list_head *p;
|
| /* Check that no files are currently opened for writing. */
| file_list_lock();
| list_for_each(p, &sb->s_files) {
| struct file *file = list_entry(p, struct file, f_list);
| struct inode *inode = file->f_dentry->d_inode;
|
| /* File with pending delete? */
| if (inode->i_nlink == 0)
| goto too_bad;
|
| /* Writeable file? */
| if (S_ISREG(inode->i_mode) && (file->f_mode & FMODE_WRITE))
| goto too_bad;
| }
| file_list_unlock();
| return 1; /* Tis' cool bro. */
|too_bad:
| file_list_unlock();
| return 0;
|}