Blame SOURCES/kvm-virtiofsd-rename-unref_inode-to-unref_inode_lolocked.patch

22c213
From cfa4550f926e7a07757853f94273f2d1589cb9d3 Mon Sep 17 00:00:00 2001
22c213
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
22c213
Date: Mon, 27 Jan 2020 19:01:48 +0100
22c213
Subject: [PATCH 077/116] virtiofsd: rename unref_inode() to
22c213
 unref_inode_lolocked()
22c213
MIME-Version: 1.0
22c213
Content-Type: text/plain; charset=UTF-8
22c213
Content-Transfer-Encoding: 8bit
22c213
22c213
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
Message-id: <20200127190227.40942-74-dgilbert@redhat.com>
22c213
Patchwork-id: 93526
22c213
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 073/112] virtiofsd: rename unref_inode() to unref_inode_lolocked()
22c213
Bugzilla: 1694164
22c213
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
22c213
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
22c213
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
22c213
22c213
From: Miklos Szeredi <mszeredi@redhat.com>
22c213
22c213
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
22c213
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
22c213
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
22c213
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22c213
(cherry picked from commit 95d2715791c60b5dc2d22e4eb7b83217273296fa)
22c213
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
22c213
---
22c213
 tools/virtiofsd/passthrough_ll.c | 15 ++++++++-------
22c213
 1 file changed, 8 insertions(+), 7 deletions(-)
22c213
22c213
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
22c213
index 8b1784f..de12e75 100644
22c213
--- a/tools/virtiofsd/passthrough_ll.c
22c213
+++ b/tools/virtiofsd/passthrough_ll.c
22c213
@@ -148,8 +148,8 @@ static const struct fuse_opt lo_opts[] = {
22c213
 };
22c213
 static bool use_syslog = false;
22c213
 static int current_log_level;
22c213
-
22c213
-static void unref_inode(struct lo_data *lo, struct lo_inode *inode, uint64_t n);
22c213
+static void unref_inode_lolocked(struct lo_data *lo, struct lo_inode *inode,
22c213
+                                 uint64_t n);
22c213
 
22c213
 static struct {
22c213
     pthread_mutex_t mutex;
22c213
@@ -586,7 +586,7 @@ retry:
22c213
     return 0;
22c213
 
22c213
 fail_unref:
22c213
-    unref_inode(lo, p, 1);
22c213
+    unref_inode_lolocked(lo, p, 1);
22c213
 fail:
22c213
     if (retries) {
22c213
         retries--;
22c213
@@ -624,7 +624,7 @@ fallback:
22c213
     res = lo_parent_and_name(lo, inode, path, &parent);
22c213
     if (res != -1) {
22c213
         res = utimensat(parent->fd, path, tv, AT_SYMLINK_NOFOLLOW);
22c213
-        unref_inode(lo, parent, 1);
22c213
+        unref_inode_lolocked(lo, parent, 1);
22c213
     }
22c213
 
22c213
     return res;
22c213
@@ -1027,7 +1027,7 @@ fallback:
22c213
     res = lo_parent_and_name(lo, inode, path, &parent);
22c213
     if (res != -1) {
22c213
         res = linkat(parent->fd, path, dfd, name, 0);
22c213
-        unref_inode(lo, parent, 1);
22c213
+        unref_inode_lolocked(lo, parent, 1);
22c213
     }
22c213
 
22c213
     return res;
22c213
@@ -1141,7 +1141,8 @@ static void lo_unlink(fuse_req_t req, fuse_ino_t parent, const char *name)
22c213
     fuse_reply_err(req, res == -1 ? errno : 0);
22c213
 }
22c213
 
22c213
-static void unref_inode(struct lo_data *lo, struct lo_inode *inode, uint64_t n)
22c213
+static void unref_inode_lolocked(struct lo_data *lo, struct lo_inode *inode,
22c213
+                                 uint64_t n)
22c213
 {
22c213
     if (!inode) {
22c213
         return;
22c213
@@ -1181,7 +1182,7 @@ static void lo_forget_one(fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
22c213
              (unsigned long long)ino, (unsigned long long)inode->refcount,
22c213
              (unsigned long long)nlookup);
22c213
 
22c213
-    unref_inode(lo, inode, nlookup);
22c213
+    unref_inode_lolocked(lo, inode, nlookup);
22c213
 }
22c213
 
22c213
 static void lo_forget(fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
22c213
-- 
22c213
1.8.3.1
22c213