/**ファイルシステム総合スレ その7**/at LINUX
/**ファイルシステム総合スレ その7**/ - 暇つぶし2ch103:80
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;
|}




次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch