Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Andrew Morton and committed by
Linus Torvalds
b2276138 1c0350bd

+11 -10
+11 -10
fs/inode.c
··· 1144 1144 res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block); 1145 1145 return res; 1146 1146 } 1147 - 1148 1147 EXPORT_SYMBOL(bmap); 1149 1148 1150 1149 /** ··· 1162 1163 1163 1164 if (IS_RDONLY(inode)) 1164 1165 return; 1165 - 1166 - if ((inode->i_flags & S_NOATIME) || 1167 - (inode->i_sb->s_flags & MS_NOATIME) || 1168 - ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))) 1166 + if (inode->i_flags & S_NOATIME) 1167 + return; 1168 + if (inode->i_sb->s_flags & MS_NOATIME) 1169 + return; 1170 + if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) 1169 1171 return; 1170 1172 1171 1173 /* 1172 1174 * We may have a NULL vfsmount when coming from NFSD 1173 1175 */ 1174 - if (mnt && 1175 - ((mnt->mnt_flags & MNT_NOATIME) || 1176 - ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))) 1177 - return; 1176 + if (mnt) { 1177 + if (mnt->mnt_flags & MNT_NOATIME) 1178 + return; 1179 + if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)) 1180 + return; 1181 + } 1178 1182 1179 1183 now = current_fs_time(inode->i_sb); 1180 1184 if (!timespec_equal(&inode->i_atime, &now)) { ··· 1185 1183 mark_inode_dirty_sync(inode); 1186 1184 } 1187 1185 } 1188 - 1189 1186 EXPORT_SYMBOL(touch_atime); 1190 1187 1191 1188 /**