Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38734
b: refs/heads/master
c: faac9bd
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Jul 5, 2006
1 parent 33c677c commit 0e041f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0dd9308b703310e9a988df70f6ed3e87cb55655
refs/heads/master: faac9bd0e3ce7cb0572ec66e0a426cacf6afa970
10 changes: 7 additions & 3 deletions trunk/fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
struct inode *inode = file->f_mapping->host;
struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_sbd *sdp = GFS2_SB(inode);
int ret;

if (rw == WRITE)
return gfs2_direct_IO_write(iocb, iov, offset, nr_segs);
Expand All @@ -650,9 +651,12 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
gfs2_assert_warn(sdp, !gfs2_is_stuffed(ip)))
return -EINVAL;

return __blockdev_direct_IO(READ, iocb, inode, inode->i_sb->s_bdev, iov,
offset, nr_segs, gfs2_get_block, NULL,
DIO_OWN_LOCKING);
mutex_lock(&inode->i_mutex);
ret = __blockdev_direct_IO(READ, iocb, inode, inode->i_sb->s_bdev, iov,
offset, nr_segs, gfs2_get_block, NULL,
DIO_OWN_LOCKING);
mutex_unlock(&inode->i_mutex);
return ret;
}

const struct address_space_operations gfs2_file_aops = {
Expand Down

0 comments on commit 0e041f5

Please sign in to comment.