diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /fs/inode.c | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/fs/inode.c b/fs/inode.c index 01fc64d23..242696d87 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -130,6 +130,7 @@ static inline void init_once(struct inode * inode) INIT_LIST_HEAD(&inode->i_hash); INIT_LIST_HEAD(&inode->i_dentry); sema_init(&inode->i_sem, 1); + spin_lock_init(&inode->i_shared_lock); } static inline void write_inode(struct inode *inode) @@ -523,7 +524,7 @@ void clean_inode(struct inode *inode) inode->i_sock = 0; inode->i_op = NULL; inode->i_nlink = 1; - inode->i_writecount = 0; + atomic_set(&inode->i_writecount, 0); inode->i_size = 0; inode->i_generation = 0; memset(&inode->i_dquot, 0, sizeof(inode->i_dquot)); @@ -818,31 +819,6 @@ void __init inode_init(void) max_inodes = max; } -/* This belongs in file_table.c, not here... */ -int fs_may_remount_ro(struct super_block *sb) -{ - struct file *file; - - /* Check that no files are currently opened for writing. */ - for (file = inuse_filps; file; file = file->f_next) { - struct inode *inode; - if (!file->f_dentry) - continue; - inode = file->f_dentry->d_inode; - if (!inode || inode->i_sb != sb) - continue; - - /* File with pending delete? */ - if (inode->i_nlink == 0) - return 0; - - /* Writable file? */ - if (S_ISREG(inode->i_mode) && (file->f_mode & FMODE_WRITE)) - return 0; - } - return 1; /* Tis' cool bro. */ -} - void update_atime (struct inode *inode) { if ( IS_NOATIME (inode) ) return; |