diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index b1fc2a6bfe8..96107efc0c6 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -95,41 +95,6 @@ xfs_mark_inode_dirty( | |||
95 | } | 95 | } |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * Change the requested timestamp in the given inode. | ||
99 | * We don't lock across timestamp updates, and we don't log them but | ||
100 | * we do record the fact that there is dirty information in core. | ||
101 | */ | ||
102 | void | ||
103 | xfs_ichgtime( | ||
104 | xfs_inode_t *ip, | ||
105 | int flags) | ||
106 | { | ||
107 | struct inode *inode = VFS_I(ip); | ||
108 | timespec_t tv; | ||
109 | int sync_it = 0; | ||
110 | |||
111 | tv = current_fs_time(inode->i_sb); | ||
112 | |||
113 | if ((flags & XFS_ICHGTIME_MOD) && | ||
114 | !timespec_equal(&inode->i_mtime, &tv)) { | ||
115 | inode->i_mtime = tv; | ||
116 | sync_it = 1; | ||
117 | } | ||
118 | if ((flags & XFS_ICHGTIME_CHG) && | ||
119 | !timespec_equal(&inode->i_ctime, &tv)) { | ||
120 | inode->i_ctime = tv; | ||
121 | sync_it = 1; | ||
122 | } | ||
123 | |||
124 | /* | ||
125 | * Update complete - now make sure everyone knows that the inode | ||
126 | * is dirty. | ||
127 | */ | ||
128 | if (sync_it) | ||
129 | xfs_mark_inode_dirty_sync(ip); | ||
130 | } | ||
131 | |||
132 | /* | ||
133 | * Hook in SELinux. This is not quite correct yet, what we really need | 98 | * Hook in SELinux. This is not quite correct yet, what we really need |
134 | * here (as we do for default ACLs) is a mechanism by which creation of | 99 | * here (as we do for default ACLs) is a mechanism by which creation of |
135 | * these attrs can be journalled at inode creation time (along with the | 100 | * these attrs can be journalled at inode creation time (along with the |
@@ -224,7 +189,7 @@ xfs_vn_mknod( | |||
224 | } | 189 | } |
225 | 190 | ||
226 | xfs_dentry_to_name(&name, dentry); | 191 | xfs_dentry_to_name(&name, dentry); |
227 | error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip, NULL); | 192 | error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip); |
228 | if (unlikely(error)) | 193 | if (unlikely(error)) |
229 | goto out_free_acl; | 194 | goto out_free_acl; |
230 | 195 | ||
@@ -352,7 +317,7 @@ xfs_vn_link( | |||
352 | if (unlikely(error)) | 317 | if (unlikely(error)) |
353 | return -error; | 318 | return -error; |
354 | 319 | ||
355 | atomic_inc(&inode->i_count); | 320 | ihold(inode); |
356 | d_instantiate(dentry, inode); | 321 | d_instantiate(dentry, inode); |
357 | return 0; | 322 | return 0; |
358 | } | 323 | } |
@@ -397,7 +362,7 @@ xfs_vn_symlink( | |||
397 | (irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO); | 362 | (irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO); |
398 | xfs_dentry_to_name(&name, dentry); | 363 | xfs_dentry_to_name(&name, dentry); |
399 | 364 | ||
400 | error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip, NULL); | 365 | error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip); |
401 | if (unlikely(error)) | 366 | if (unlikely(error)) |
402 | goto out; | 367 | goto out; |
403 | 368 | ||
@@ -795,7 +760,9 @@ xfs_setup_inode( | |||
795 | 760 | ||
796 | inode->i_ino = ip->i_ino; | 761 | inode->i_ino = ip->i_ino; |
797 | inode->i_state = I_NEW; | 762 | inode->i_state = I_NEW; |
798 | inode_add_to_lists(ip->i_mount->m_super, inode); | 763 | |
764 | inode_sb_list_add(inode); | ||
765 | insert_inode_hash(inode); | ||
799 | 766 | ||
800 | inode->i_mode = ip->i_d.di_mode; | 767 | inode->i_mode = ip->i_d.di_mode; |
801 | inode->i_nlink = ip->i_d.di_nlink; | 768 | inode->i_nlink = ip->i_d.di_nlink; |