The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.1
------>
commit 1afb64a2b072afc6d3914c0f096635005a26fe8a
Author: Kirill Tkhai <ktk...@virtuozzo.com>
Date:   Mon Jul 9 17:32:50 2018 +0300

    fuse: Revert "fuse: set num_openers on create"
    
    This reverts commit 7fae2240955a0480e02f9b50147179ddeb344ba2.
    
    It's not need after "fuse kio: Read file attributes every first open".
    
    Reported-by: Pavel Putsykin <pbutsy...@virtuozzo.com>
    Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>
---
 fs/fuse/dir.c    |  8 ++++----
 fs/fuse/fuse_i.h |  2 +-
 fs/fuse/inode.c  | 11 +++++------
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 8dcad8b8c20e..03fe07260c13 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -322,7 +322,7 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, 
struct qstr *name,
 
        *inode = fuse_iget(sb, outarg->nodeid, outarg->generation,
                           &outarg->attr, entry_attr_timeout(outarg),
-                          attr_version, 0);
+                          attr_version);
        err = -ENOMEM;
        if (!*inode) {
                fuse_queue_forget(fc, forget, outarg->nodeid, 1);
@@ -476,7 +476,7 @@ static int fuse_create_open(struct inode *dir, struct 
dentry *entry,
        ff->nodeid = outentry.nodeid;
        ff->open_flags = outopen.open_flags;
        inode = fuse_iget(dir->i_sb, outentry.nodeid, outentry.generation,
-                         &outentry.attr, entry_attr_timeout(&outentry), 0, 1);
+                         &outentry.attr, entry_attr_timeout(&outentry), 0);
        if (!inode) {
                flags &= ~(O_CREAT | O_EXCL | O_TRUNC);
                fuse_sync_release(ff, flags);
@@ -610,7 +610,7 @@ static int create_new_entry(struct fuse_conn *fc, struct 
fuse_req *req,
                goto out_put_forget_req;
 
        inode = fuse_iget(dir->i_sb, outarg.nodeid, outarg.generation,
-                         &outarg.attr, entry_attr_timeout(&outarg), 0, 0);
+                         &outarg.attr, entry_attr_timeout(&outarg), 0);
        if (!inode) {
                fuse_queue_forget(fc, forget, outarg.nodeid, 1);
                return -ENOMEM;
@@ -1372,7 +1372,7 @@ static int fuse_direntplus_link(struct file *file,
                goto out;
 
        inode = fuse_iget(dir->i_sb, o->nodeid, o->generation,
-                         &o->attr, entry_attr_timeout(o), attr_version, 0);
+                         &o->attr, entry_attr_timeout(o), attr_version);
        if (!inode)
                goto out;
 
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index c2b95d679b77..0314be536799 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -808,7 +808,7 @@ int fuse_inode_eq(struct inode *inode, void *_nodeidp);
  */
 struct inode *fuse_iget(struct super_block *sb, u64 nodeid,
                        int generation, struct fuse_attr *attr,
-                       u64 attr_valid, u64 attr_version, int creat);
+                       u64 attr_valid, u64 attr_version);
 
 int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name,
                     struct fuse_entry_out *outarg, struct inode **inode);
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 13571c9bce93..df7789a40ca4 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -266,11 +266,10 @@ void fuse_change_attributes(struct inode *inode, struct 
fuse_attr *attr,
        }
 }
 
-static void fuse_init_inode(struct inode *inode, struct fuse_attr *attr,
-                           int num_openers)
+static void fuse_init_inode(struct inode *inode, struct fuse_attr *attr)
 {
        struct fuse_inode *fi = get_fuse_inode(inode);
-       atomic_set(&fi->num_openers, num_openers);
+       atomic_set(&fi->num_openers, 0);
 
        inode->i_mode = attr->mode & S_IFMT;
        inode->i_size = attr->size;
@@ -310,7 +309,7 @@ static int fuse_inode_set(struct inode *inode, void 
*_nodeidp)
 
 struct inode *fuse_iget(struct super_block *sb, u64 nodeid,
                        int generation, struct fuse_attr *attr,
-                       u64 attr_valid, u64 attr_version, int creat)
+                       u64 attr_valid, u64 attr_version)
 {
        struct inode *inode;
        struct fuse_inode *fi;
@@ -327,7 +326,7 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid,
                        inode->i_flags |= S_NOCMTIME;
                inode->i_generation = generation;
                inode->i_data.backing_dev_info = &fc->bdi;
-               fuse_init_inode(inode, attr, 0);
+               fuse_init_inode(inode, attr);
                unlock_new_inode(inode);
        } else if ((inode->i_mode ^ attr->mode) & S_IFMT) {
                /* Inode has changed type, any I/O on the old should fail */
@@ -851,7 +850,7 @@ static struct inode *fuse_get_root_inode(struct super_block 
*sb, unsigned mode)
        attr.mode = mode;
        attr.ino = FUSE_ROOT_ID;
        attr.nlink = 1;
-       return fuse_iget(sb, 1, 0, &attr, 0, 0, 0);
+       return fuse_iget(sb, 1, 0, &attr, 0, 0);
 }
 
 struct fuse_inode_handle {
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to