aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2019-11-20 14:11:09 +0000
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:37 +0000
commit95d2715791c60b5dc2d22e4eb7b83217273296fa (patch)
treefb305b9afacd26fee58aa15f817b119173e5eecb /tools
parent59aef494be2d8d91055ff3f3a8eb13d9f32873d8 (diff)
downloadqemu-95d2715791c60b5dc2d22e4eb7b83217273296fa.zip
qemu-95d2715791c60b5dc2d22e4eb7b83217273296fa.tar.gz
qemu-95d2715791c60b5dc2d22e4eb7b83217273296fa.tar.bz2
virtiofsd: rename unref_inode() to unref_inode_lolocked()
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/passthrough_ll.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 8b1784f..de12e75 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -148,8 +148,8 @@ static const struct fuse_opt lo_opts[] = {
};
static bool use_syslog = false;
static int current_log_level;
-
-static void unref_inode(struct lo_data *lo, struct lo_inode *inode, uint64_t n);
+static void unref_inode_lolocked(struct lo_data *lo, struct lo_inode *inode,
+ uint64_t n);
static struct {
pthread_mutex_t mutex;
@@ -586,7 +586,7 @@ retry:
return 0;
fail_unref:
- unref_inode(lo, p, 1);
+ unref_inode_lolocked(lo, p, 1);
fail:
if (retries) {
retries--;
@@ -624,7 +624,7 @@ fallback:
res = lo_parent_and_name(lo, inode, path, &parent);
if (res != -1) {
res = utimensat(parent->fd, path, tv, AT_SYMLINK_NOFOLLOW);
- unref_inode(lo, parent, 1);
+ unref_inode_lolocked(lo, parent, 1);
}
return res;
@@ -1027,7 +1027,7 @@ fallback:
res = lo_parent_and_name(lo, inode, path, &parent);
if (res != -1) {
res = linkat(parent->fd, path, dfd, name, 0);
- unref_inode(lo, parent, 1);
+ unref_inode_lolocked(lo, parent, 1);
}
return res;
@@ -1141,7 +1141,8 @@ static void lo_unlink(fuse_req_t req, fuse_ino_t parent, const char *name)
fuse_reply_err(req, res == -1 ? errno : 0);
}
-static void unref_inode(struct lo_data *lo, struct lo_inode *inode, uint64_t n)
+static void unref_inode_lolocked(struct lo_data *lo, struct lo_inode *inode,
+ uint64_t n)
{
if (!inode) {
return;
@@ -1181,7 +1182,7 @@ static void lo_forget_one(fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
(unsigned long long)ino, (unsigned long long)inode->refcount,
(unsigned long long)nlookup);
- unref_inode(lo, inode, nlookup);
+ unref_inode_lolocked(lo, inode, nlookup);
}
static void lo_forget(fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)