[RHEL7,COMMIT] ploop: Refactoring in ploop1_open()

Submitted by Vasily Averin on Aug. 28, 2020, 4:38 a.m.

Details

Message ID 202008280438.07S4c0Pu009610@vz7build.vvs.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Vasily Averin Aug. 28, 2020, 4:38 a.m.
The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.13
------>
commit c47bfbf418f5191f9f2271c64dce61b9af504bec
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Fri Aug 28 07:38:00 2020 +0300

    ploop: Refactoring in ploop1_open()
    
    This is not refactoring for external modules only,
    if there is one.
    
    https://jira.sw.ru/browse/PSBM-105347
    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 0036e09..29c3166 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;