aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorTiger Yang <tiger.yang@oracle.com>2006-11-15 02:49:02 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2006-12-01 21:28:58 -0500
commit25899deef46c226c49c53b42c00e0f032379c04b (patch)
treeac8c19482ab05ee2e13d874eecd8b2eaa507a156 /fs/ocfs2/file.c
parent7f1a37e31f94b4f1c123d32ce9f69205ab2095bd (diff)
ocfs2: update file system paths to set atime
Conditionally update atime in ocfs2_file_aio_read(), ocfs2_readdir() and ocfs2_mmap(). Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index e82288f7cf21..b64ef7c6e2d2 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1254,7 +1254,7 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
1254 unsigned long nr_segs, 1254 unsigned long nr_segs,
1255 loff_t pos) 1255 loff_t pos)
1256{ 1256{
1257 int ret = 0, rw_level = -1, have_alloc_sem = 0; 1257 int ret = 0, rw_level = -1, have_alloc_sem = 0, lock_level = 0;
1258 struct file *filp = iocb->ki_filp; 1258 struct file *filp = iocb->ki_filp;
1259 struct inode *inode = filp->f_dentry->d_inode; 1259 struct inode *inode = filp->f_dentry->d_inode;
1260 1260
@@ -1296,12 +1296,12 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
1296 * like i_size. This allows the checks down below 1296 * like i_size. This allows the checks down below
1297 * generic_file_aio_read() a chance of actually working. 1297 * generic_file_aio_read() a chance of actually working.
1298 */ 1298 */
1299 ret = ocfs2_meta_lock(inode, NULL, 0); 1299 ret = ocfs2_meta_lock_atime(inode, filp->f_vfsmnt, &lock_level);
1300 if (ret < 0) { 1300 if (ret < 0) {
1301 mlog_errno(ret); 1301 mlog_errno(ret);
1302 goto bail; 1302 goto bail;
1303 } 1303 }
1304 ocfs2_meta_unlock(inode, 0); 1304 ocfs2_meta_unlock(inode, lock_level);
1305 1305
1306 ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos); 1306 ret = generic_file_aio_read(iocb, iov, nr_segs, iocb->ki_pos);
1307 if (ret == -EINVAL) 1307 if (ret == -EINVAL)