aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
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)