diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 05ab70dd5c64..09308ad0f314 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -3010,6 +3010,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, | |||
3010 | overwrite = *((int *)iocb->private); | 3010 | overwrite = *((int *)iocb->private); |
3011 | 3011 | ||
3012 | if (overwrite) { | 3012 | if (overwrite) { |
3013 | atomic_inc(&inode->i_dio_count); | ||
3013 | down_read(&EXT4_I(inode)->i_data_sem); | 3014 | down_read(&EXT4_I(inode)->i_data_sem); |
3014 | mutex_unlock(&inode->i_mutex); | 3015 | mutex_unlock(&inode->i_mutex); |
3015 | } | 3016 | } |
@@ -3107,6 +3108,7 @@ static ssize_t ext4_ext_direct_IO(int rw, struct kiocb *iocb, | |||
3107 | retake_lock: | 3108 | retake_lock: |
3108 | /* take i_mutex locking again if we do a ovewrite dio */ | 3109 | /* take i_mutex locking again if we do a ovewrite dio */ |
3109 | if (overwrite) { | 3110 | if (overwrite) { |
3111 | inode_dio_done(inode); | ||
3110 | up_read(&EXT4_I(inode)->i_data_sem); | 3112 | up_read(&EXT4_I(inode)->i_data_sem); |
3111 | mutex_lock(&inode->i_mutex); | 3113 | mutex_lock(&inode->i_mutex); |
3112 | } | 3114 | } |