diff options
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 558ce0312421..da097bd07b72 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -1836,6 +1836,8 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, | |||
1836 | &meta_level); | 1836 | &meta_level); |
1837 | if (has_refcount) | 1837 | if (has_refcount) |
1838 | *has_refcount = 1; | 1838 | *has_refcount = 1; |
1839 | if (direct_io) | ||
1840 | *direct_io = 0; | ||
1839 | } | 1841 | } |
1840 | 1842 | ||
1841 | if (ret < 0) { | 1843 | if (ret < 0) { |
@@ -1859,10 +1861,6 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, | |||
1859 | break; | 1861 | break; |
1860 | } | 1862 | } |
1861 | 1863 | ||
1862 | if (has_refcount && *has_refcount == 1) { | ||
1863 | *direct_io = 0; | ||
1864 | break; | ||
1865 | } | ||
1866 | /* | 1864 | /* |
1867 | * Allowing concurrent direct writes means | 1865 | * Allowing concurrent direct writes means |
1868 | * i_size changes wouldn't be synchronized, so | 1866 | * i_size changes wouldn't be synchronized, so |