[Devel] [PATCH RH7 2/5] ploop: Refactoring in ploop1_open()

Kirill Tkhai ktkhai at virtuozzo.com
Thu Aug 27 18:41:26 MSK 2020


This is not refactoring for external modules only,
if there is one.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 0036e09b4bf4..29c3166b24eb 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -334,8 +334,8 @@ ploop1_open(struct ploop_delta * delta)
 		delta->flags |= PLOOP_FMT_PREALLOCATED;
 
 	/* FIXME: is there a better place for this? */
-	if (delta->io.ops->id != PLOOP_IO_DIRECT &&
-	    delta->io.files.inode->i_sb->s_magic != EXT4_SUPER_MAGIC)
+	if (delta->io.ops->id == PLOOP_IO_KAIO &&
+	    delta->io.files.inode->i_sb->s_magic == FUSE_SUPER_MAGIC)
 		set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);
 
 	return 0;




More information about the Devel mailing list