The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear 
at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.31
------>
commit 1ca7fa727af37253ed486a6aa53dffb828c5692d
Author: Konstantin Khorenko <[email protected]>
Date:   Fri May 21 17:29:27 2021 +0300

    ext4/balloon: Use proper O_ mode flags in balloon opening code
    
    alloc_file() expects O_* mode flags, so provide them, not
    internal FMODE_* ones.
    
    Fixes: bee340a206d7 ("ext4: Provide a balloon nipple for management")
    https://jira.sw.ru/browse/PSBM-129392
    
    Signed-off-by: Konstantin Khorenko <[email protected]>
    Reviewed-by: Kirill Tkhai <[email protected]>
---
 fs/ext4/ioctl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index ecdc15881007..6d5b5e2eda91 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -775,11 +775,11 @@ static int ext4_open_balloon(struct super_block *sb, 
struct vfsmount *mnt)
        path.mnt = mntget(mnt);
        err = mnt_want_write(path.mnt);
        if (err)
-               mode = FMODE_READ;
+               mode = O_RDONLY;
        else
-               mode = FMODE_READ | FMODE_WRITE;
+               mode = O_RDWR;
        filp = alloc_file(&path, mode, &ext4_file_operations);
-       if (mode & FMODE_WRITE)
+       if (filp->f_mode & FMODE_WRITE)
                mnt_drop_write(path.mnt);
        if (IS_ERR(filp)) {
                err = PTR_ERR(filp);
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to