diff options
Diffstat (limited to 'fs/file_table.c')
| -rw-r--r-- | fs/file_table.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index c322794f7360..20002e39754d 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
| @@ -474,29 +474,6 @@ void file_sb_list_del(struct file *file) | |||
| 474 | 474 | ||
| 475 | #endif | 475 | #endif |
| 476 | 476 | ||
| 477 | int fs_may_remount_ro(struct super_block *sb) | ||
| 478 | { | ||
| 479 | struct file *file; | ||
| 480 | /* Check that no files are currently opened for writing. */ | ||
| 481 | lg_global_lock(files_lglock); | ||
| 482 | do_file_list_for_each_entry(sb, file) { | ||
| 483 | struct inode *inode = file->f_path.dentry->d_inode; | ||
| 484 | |||
| 485 | /* File with pending delete? */ | ||
| 486 | if (inode->i_nlink == 0) | ||
| 487 | goto too_bad; | ||
| 488 | |||
| 489 | /* Writeable file? */ | ||
| 490 | if (S_ISREG(inode->i_mode) && (file->f_mode & FMODE_WRITE)) | ||
| 491 | goto too_bad; | ||
| 492 | } while_file_list_for_each_entry; | ||
| 493 | lg_global_unlock(files_lglock); | ||
| 494 | return 1; /* Tis' cool bro. */ | ||
| 495 | too_bad: | ||
| 496 | lg_global_unlock(files_lglock); | ||
| 497 | return 0; | ||
| 498 | } | ||
| 499 | |||
| 500 | /** | 477 | /** |
| 501 | * mark_files_ro - mark all files read-only | 478 | * mark_files_ro - mark all files read-only |
| 502 | * @sb: superblock in question | 479 | * @sb: superblock in question |
