aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-02-10 04:44:49 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:25 -0500
commit37756ced1f145aec18917812c3b8a96dbb47990d (patch)
treea293813e3dce24a161c2cf029c4139086a23d978 /fs/inode.c
parent4ba4d4c0c52201009232fe9e781a281054a24e75 (diff)
[PATCH] avoid one conditional branch in touch_atime()
I added IS_NOATIME(inode) macro definition in include/linux/fs.h, true if the inode superblock is marked readonly or noatime. This new macro is then used in touch_atime() instead of separatly testing MS_RDONLY and MS_NOATIME Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/inode.c b/fs/inode.c
index bf21dc6d0dbd..6cacdab25e0a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1160,11 +1160,9 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
1160 struct inode *inode = dentry->d_inode; 1160 struct inode *inode = dentry->d_inode;
1161 struct timespec now; 1161 struct timespec now;
1162 1162
1163 if (IS_RDONLY(inode))
1164 return;
1165 if (inode->i_flags & S_NOATIME) 1163 if (inode->i_flags & S_NOATIME)
1166 return; 1164 return;
1167 if (inode->i_sb->s_flags & MS_NOATIME) 1165 if (IS_NOATIME(inode))
1168 return; 1166 return;
1169 if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) 1167 if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))
1170 return; 1168 return;