ocfs2: fix a refcount condition checking -v2
PATCH 1/1 ocfs2: fix a refcount condition checking -v2
We disable DIO write if the inode has reflink. The way to determine if the inode has reflink is wrong in case (!has_refcount && direct_io). The patch fixes it.
Signed-off-by Wengang Wang <[email protected]>
--- file.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
fs/ocfs2/file.c +2 -4
@@ -1836,6 +1836,8 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, &meta_level);if (has_refcount) *has_refcount =1 ; +if (direct_io) + *direct_io =0 ; }if (ret <0 ) {
@@ -1859,10 +1861,6 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry,break ; } -if (has_refcount && *has_refcount ==1 ) { - *direct_io =0 ; -break ; - }/* * Allowing concurrent direct writes means * i_size changes wouldn't be synchronized, so
PATCH 1/1 ocfs2: fix a refcount condition checking -v2
Quoted 4 lines · Wengang Wang
We disable DIO write if the inode has reflink. The way to determine if the inode has reflink is wrong in case (!has_refcount &&
direct_io). The patch fixes it.Signed-off-by Wengang Wang <[email protected]>
This patch, with a modified description, is now in the 'merge-window' branch of ocfs2.git.
Joel
Signature · 9 lines
"There is a country in Europe where multiple-choice tests are
illegal."
- Sigfried Hulzer
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127