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

Submitted by Kirill Tkhai on Aug. 27, 2020, 3:41 p.m.

Details

Message ID 159854288270.335074.8899364756310603522.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai Aug. 27, 2020, 3:41 p.m.
This is not refactoring for external modules only,
if there is one.

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

Patch hide | download patch | download mbox

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;