inode.c (a0292f3ebe63f8ed7ea28de57751f6bfb9416242) | inode.c (75bd228d5637b58e24119a263c1b4e4a875d9498) |
---|---|
1/* 2 * Copyright (c) 2002 Red Hat, Inc. All rights reserved. 3 * 4 * This software may be freely redistributed under the terms of the 5 * GNU General Public License. 6 * 7 * You should have received a copy of the GNU General Public License 8 * along with this program; if not, write to the Free Software --- 81 unchanged lines hidden (view full) --- 90 inode->i_gid = make_kgid(&init_user_ns, status->group); 91 set_nlink(&vnode->vfs_inode, status->nlink); 92 93 switch (status->type) { 94 case AFS_FTYPE_FILE: 95 inode->i_mode = S_IFREG | (status->mode & S_IALLUGO); 96 inode->i_op = &afs_file_inode_operations; 97 inode->i_fop = &afs_file_operations; | 1/* 2 * Copyright (c) 2002 Red Hat, Inc. All rights reserved. 3 * 4 * This software may be freely redistributed under the terms of the 5 * GNU General Public License. 6 * 7 * You should have received a copy of the GNU General Public License 8 * along with this program; if not, write to the Free Software --- 81 unchanged lines hidden (view full) --- 90 inode->i_gid = make_kgid(&init_user_ns, status->group); 91 set_nlink(&vnode->vfs_inode, status->nlink); 92 93 switch (status->type) { 94 case AFS_FTYPE_FILE: 95 inode->i_mode = S_IFREG | (status->mode & S_IALLUGO); 96 inode->i_op = &afs_file_inode_operations; 97 inode->i_fop = &afs_file_operations; |
98 inode->i_mapping->a_ops = &afs_fs_aops; | 98 inode->i_mapping->a_ops = &afs_file_aops; |
99 break; 100 case AFS_FTYPE_DIR: 101 inode->i_mode = S_IFDIR | (status->mode & S_IALLUGO); 102 inode->i_op = &afs_dir_inode_operations; 103 inode->i_fop = &afs_dir_file_operations; 104 inode->i_mapping->a_ops = &afs_dir_aops; 105 break; 106 case AFS_FTYPE_SYMLINK: 107 /* Symlinks with a mode of 0644 are actually mountpoints. */ 108 if ((status->mode & 0777) == 0644) { 109 inode->i_flags |= S_AUTOMOUNT; 110 111 set_bit(AFS_VNODE_MOUNTPOINT, &vnode->flags); 112 113 inode->i_mode = S_IFDIR | 0555; 114 inode->i_op = &afs_mntpt_inode_operations; 115 inode->i_fop = &afs_mntpt_file_operations; | 99 break; 100 case AFS_FTYPE_DIR: 101 inode->i_mode = S_IFDIR | (status->mode & S_IALLUGO); 102 inode->i_op = &afs_dir_inode_operations; 103 inode->i_fop = &afs_dir_file_operations; 104 inode->i_mapping->a_ops = &afs_dir_aops; 105 break; 106 case AFS_FTYPE_SYMLINK: 107 /* Symlinks with a mode of 0644 are actually mountpoints. */ 108 if ((status->mode & 0777) == 0644) { 109 inode->i_flags |= S_AUTOMOUNT; 110 111 set_bit(AFS_VNODE_MOUNTPOINT, &vnode->flags); 112 113 inode->i_mode = S_IFDIR | 0555; 114 inode->i_op = &afs_mntpt_inode_operations; 115 inode->i_fop = &afs_mntpt_file_operations; |
116 inode->i_mapping->a_ops = &afs_fs_aops; | 116 inode->i_mapping->a_ops = &afs_symlink_aops; |
117 } else { 118 inode->i_mode = S_IFLNK | status->mode; 119 inode->i_op = &afs_symlink_inode_operations; | 117 } else { 118 inode->i_mode = S_IFLNK | status->mode; 119 inode->i_op = &afs_symlink_inode_operations; |
120 inode->i_mapping->a_ops = &afs_fs_aops; | 120 inode->i_mapping->a_ops = &afs_symlink_aops; |
121 } 122 inode_nohighmem(inode); 123 break; 124 default: 125 dump_vnode(vnode, op->file[0].vnode != vnode ? op->file[0].vnode : NULL); 126 write_sequnlock(&vnode->cb_lock); 127 return afs_protocol_error(NULL, afs_eproto_file_type); 128 } --- 784 unchanged lines hidden --- | 121 } 122 inode_nohighmem(inode); 123 break; 124 default: 125 dump_vnode(vnode, op->file[0].vnode != vnode ? op->file[0].vnode : NULL); 126 write_sequnlock(&vnode->cb_lock); 127 return afs_protocol_error(NULL, afs_eproto_file_type); 128 } --- 784 unchanged lines hidden --- |