Commit b227613841d4d211a10c5860acc73e133b613bc0

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent 1c0350bd0c

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

Showing 1 changed file with 11 additions and 10 deletions Side-by-side Diff

... ... @@ -1144,7 +1144,6 @@
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 /**
1151 1150  
1152 1151  
... ... @@ -1163,19 +1162,22 @@
1163 1162  
1164 1163 if (IS_RDONLY(inode))
1165 1164 return;
1166   -
1167   - if ((inode->i_flags & S_NOATIME) ||
1168   - (inode->i_sb->s_flags & MS_NOATIME) ||
1169   - ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)))
  1165 + if (inode->i_flags & S_NOATIME)
1170 1166 return;
  1167 + if (inode->i_sb->s_flags & MS_NOATIME)
  1168 + return;
  1169 + if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
  1170 + return;
1171 1171  
1172 1172 /*
1173 1173 * We may have a NULL vfsmount when coming from NFSD
1174 1174 */
1175   - if (mnt &&
1176   - ((mnt->mnt_flags & MNT_NOATIME) ||
1177   - ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))))
1178   - return;
  1175 + if (mnt) {
  1176 + if (mnt->mnt_flags & MNT_NOATIME)
  1177 + return;
  1178 + if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
  1179 + return;
  1180 + }
1179 1181  
1180 1182 now = current_fs_time(inode->i_sb);
1181 1183 if (!timespec_equal(&inode->i_atime, &now)) {
... ... @@ -1183,7 +1185,6 @@
1183 1185 mark_inode_dirty_sync(inode);
1184 1186 }
1185 1187 }
1186   -
1187 1188 EXPORT_SYMBOL(touch_atime);
1188 1189  
1189 1190 /**