Commit b2276138 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1c0350bd
...@@ -1144,7 +1144,6 @@ sector_t bmap(struct inode * inode, sector_t block) ...@@ -1144,7 +1144,6 @@ sector_t bmap(struct inode * inode, sector_t block)
res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block); res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block);
return res; return res;
} }
EXPORT_SYMBOL(bmap); EXPORT_SYMBOL(bmap);
/** /**
...@@ -1163,19 +1162,22 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) ...@@ -1163,19 +1162,22 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
if (IS_RDONLY(inode)) if (IS_RDONLY(inode))
return; return;
if (inode->i_flags & S_NOATIME)
if ((inode->i_flags & S_NOATIME) || return;
(inode->i_sb->s_flags & MS_NOATIME) || if (inode->i_sb->s_flags & MS_NOATIME)
((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))) return;
if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
return; return;
/* /*
* We may have a NULL vfsmount when coming from NFSD * We may have a NULL vfsmount when coming from NFSD
*/ */
if (mnt && if (mnt) {
((mnt->mnt_flags & MNT_NOATIME) || if (mnt->mnt_flags & MNT_NOATIME)
((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))) return;
return; if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
return;
}
now = current_fs_time(inode->i_sb); now = current_fs_time(inode->i_sb);
if (!timespec_equal(&inode->i_atime, &now)) { if (!timespec_equal(&inode->i_atime, &now)) {
...@@ -1183,7 +1185,6 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) ...@@ -1183,7 +1185,6 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
mark_inode_dirty_sync(inode); mark_inode_dirty_sync(inode);
} }
} }
EXPORT_SYMBOL(touch_atime); EXPORT_SYMBOL(touch_atime);
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment