patch-2.3.43 linux/fs/affs/inode.c

Next file: linux/fs/affs/namei.c
Previous file: linux/fs/affs/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/fs/affs/inode.c linux/fs/affs/inode.c
@@ -166,16 +166,20 @@
 	if (S_ISREG(inode->i_mode)) {
 		if (inode->i_sb->u.affs_sb.s_flags & SF_OFS) {
 			inode->i_op = &affs_file_inode_operations_ofs;
-		} else {
-			inode->i_op = &affs_file_inode_operations;
+			return;
 		}
+		inode->i_op = &affs_file_inode_operations;
+		inode->i_mapping->a_ops = &affs_aops;
+		inode->u.affs_i.mmu_private = inode->i_size;
 	} else if (S_ISDIR(inode->i_mode)) {
 		/* Maybe it should be controlled by mount parameter? */
 		inode->i_mode |= S_ISVTX;
 		inode->i_op = &affs_dir_inode_operations;
 	}
-	else if (S_ISLNK(inode->i_mode))
-		inode->i_op = &affs_symlink_inode_operations;
+	else if (S_ISLNK(inode->i_mode)) {
+		inode->i_op = &page_symlink_inode_operations;
+		inode->i_data.a_ops = &affs_symlink_aops;
+	}
 }
 
 void

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)