aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-12-13 03:34:33 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:50 -0500
commitb227613841d4d211a10c5860acc73e133b613bc0 (patch)
tree273f9672954f65edb0098da6f65a27a30ad46bbc /fs/inode.c
parent1c0350bd0c9b59957760e67516973db35bafa050 (diff)
[PATCH] touch_atime() cleanup
Simplify touch_atime() layout. Cc: Valerie Henson <val_henson@linux.intel.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/fs/inode.c b/fs/inode.c
index d00de182ecb9..04536ebc5ac4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1144,7 +1144,6 @@ sector_t bmap(struct inode * inode, sector_t block)
1144 res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block); 1144 res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block);
1145 return res; 1145 return res;
1146} 1146}
1147
1148EXPORT_SYMBOL(bmap); 1147EXPORT_SYMBOL(bmap);
1149 1148
1150/** 1149/**
@@ -1163,19 +1162,22 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
1163 1162
1164 if (IS_RDONLY(inode)) 1163 if (IS_RDONLY(inode))
1165 return; 1164 return;
1166 1165 if (inode->i_flags & S_NOATIME)
1167 if ((inode->i_flags & S_NOATIME) || 1166 return;
1168 (inode->i_sb->s_flags & MS_NOATIME) || 1167 if (inode->i_sb->s_flags & MS_NOATIME)
1169 ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))) 1168 return;
1169 if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
1170 return; 1170 return;
1171 1171
1172 /* 1172 /*
1173 * We may have a NULL vfsmount when coming from NFSD 1173 * We may have a NULL vfsmount when coming from NFSD
1174 */ 1174 */
1175 if (mnt && 1175 if (mnt) {
1176 ((mnt->mnt_flags & MNT_NOATIME) || 1176 if (mnt->mnt_flags & MNT_NOATIME)
1177 ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))) 1177 return;
1178 return; 1178 if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
1179 return;
1180 }
1179 1181
1180 now = current_fs_time(inode->i_sb); 1182 now = current_fs_time(inode->i_sb);
1181 if (!timespec_equal(&inode->i_atime, &now)) { 1183 if (!timespec_equal(&inode->i_atime, &now)) {
@@ -1183,7 +1185,6 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
1183 mark_inode_dirty_sync(inode); 1185 mark_inode_dirty_sync(inode);
1184 } 1186 }
1185} 1187}
1186
1187EXPORT_SYMBOL(touch_atime); 1188EXPORT_SYMBOL(touch_atime);
1188 1189
1189/** 1190/**