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