Displaying 1 result from an estimated 1 matches for "btrfs_inode_readdio_need_lock".
2013 Jan 31
4
[RFC][PATCH 2/2] Btrfs: implement unlocked dio write
...t;
int flags = 0;
- bool wakeup = false;
+ bool wakeup = true;
int ret;
if (check_direct_IO(BTRFS_I(inode)->root, rw, iocb, iov,
offset, nr_segs))
return 0;
- if (rw == READ) {
- atomic_inc(&inode->i_dio_count);
- smp_mb__after_atomic_inc();
- if (unlikely(test_bit(BTRFS_INODE_READDIO_NEED_LOCK,
- &BTRFS_I(inode)->runtime_flags))) {
- inode_dio_done(inode);
- flags = DIO_LOCKING | DIO_SKIP_HOLES;
- } else {
- wakeup = true;
- }
+ atomic_inc(&inode->i_dio_count);
+ smp_mb__after_atomic_inc();
+ if (rw == WRITE) {
+ mutex_unlock(&inode->i_mutex);
+ } e...