patch-2.1.45 linux/fs/file_table.c
Next file: linux/fs/filesystems.c
Previous file: linux/fs/fifo.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sun Jul 13 21:20:10 1997
- Orig file:
v2.1.44/linux/fs/file_table.c
- Orig date:
Thu May 15 16:48:04 1997
diff -u --recursive --new-file v2.1.44/linux/fs/file_table.c linux/fs/file_table.c
@@ -109,11 +109,15 @@
struct file *filp;
for (filp = inuse_filps; filp; filp = filp->f_next) {
- if (!filp->f_inode || filp->f_inode->i_dev != dev)
+ struct inode * inode;
+ if (!filp->f_dentry)
continue;
- if (filp->f_mode & FMODE_WRITE && filp->f_inode->i_sb->dq_op) {
- filp->f_inode->i_sb->dq_op->initialize(filp->f_inode, type);
- filp->f_inode->i_flags |= S_WRITE;
+ inode = filp->f_dentry->d_inode;
+ if (!inode || inode->i_dev != dev)
+ continue;
+ if (filp->f_mode & FMODE_WRITE && inode->i_sb->dq_op) {
+ inode->i_sb->dq_op->initialize(inode, type);
+ inode->i_flags |= S_WRITE;
}
}
}
@@ -123,11 +127,15 @@
struct file *filp;
for (filp = inuse_filps; filp; filp = filp->f_next) {
- if (!filp->f_inode || filp->f_inode->i_dev != dev)
+ struct inode * inode;
+ if (!filp->f_dentry)
+ continue;
+ inode = filp->f_dentry->d_inode;
+ if (!inode || inode->i_dev != dev)
continue;
- if (IS_WRITABLE(filp->f_inode)) {
- filp->f_inode->i_dquot[type] = NODQUOT;
- filp->f_inode->i_flags &= ~S_WRITE;
+ if (IS_WRITABLE(inode)) {
+ inode->i_dquot[type] = NODQUOT;
+ inode->i_flags &= ~S_WRITE;
}
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov