summaryrefslogtreecommitdiffstats
path: root/fs/ext2/inode.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
commit8624512aa908741ba2795200133eae0d7f4557ea (patch)
treed5d3036fccf2604f4c98dedc11e8adb929d6b52e /fs/ext2/inode.c
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r--fs/ext2/inode.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index a520ab40f..cfaf5d4d3 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -50,7 +50,7 @@ void ext2_delete_inode (struct inode * inode)
if (is_bad_inode(inode) ||
inode->i_ino == EXT2_ACL_IDX_INO ||
inode->i_ino == EXT2_ACL_DATA_INO)
- return;
+ goto no_delete;
inode->u.ext2_i.i_dtime = CURRENT_TIME;
mark_inode_dirty(inode);
ext2_update_inode(inode, IS_SYNC(inode));
@@ -60,6 +60,10 @@ void ext2_delete_inode (struct inode * inode)
ext2_free_inode (inode);
unlock_kernel();
+ return;
+no_delete:
+ clear_inode(inode); /* We must guarantee clearing of inode... */
+ unlock_kernel();
}
#define inode_bmap(inode, nr) (le32_to_cpu((inode)->u.ext2_i.i_data[(nr)]))
@@ -751,10 +755,12 @@ void ext2_read_inode (struct inode * inode)
/* Nothing to do */ ;
else if (S_ISREG(inode->i_mode)) {
inode->i_op = &ext2_file_inode_operations;
+ inode->i_fop = &ext2_file_operations;
inode->i_mapping->a_ops = &ext2_aops;
- } else if (S_ISDIR(inode->i_mode))
+ } else if (S_ISDIR(inode->i_mode)) {
inode->i_op = &ext2_dir_inode_operations;
- else if (S_ISLNK(inode->i_mode)) {
+ inode->i_fop = &ext2_dir_operations;
+ } else if (S_ISLNK(inode->i_mode)) {
if (!inode->i_blocks)
inode->i_op = &ext2_fast_symlink_inode_operations;
else {