[PATCH 069/104] virtiofsd: rename unref_inode() to unref_inode_lolocked()

Dr. David Alan Gilbert (git) posted 104 patches 6 years ago
There is a newer version of this series
[PATCH 069/104] virtiofsd: rename unref_inode() to unref_inode_lolocked()
Posted by Dr. David Alan Gilbert (git) 6 years ago
From: Miklos Szeredi <mszeredi@redhat.com>

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 tools/virtiofsd/passthrough_ll.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index c3e8bde5cf..1618db5a92 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -149,8 +149,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;
@@ -587,7 +587,7 @@ retry:
     return 0;
 
 fail_unref:
-    unref_inode(lo, p, 1);
+    unref_inode_lolocked(lo, p, 1);
 fail:
     if (retries) {
         retries--;
@@ -625,7 +625,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;
@@ -1011,7 +1011,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;
@@ -1125,7 +1125,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;
@@ -1165,7 +1166,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)
-- 
2.23.0


Re: [PATCH 069/104] virtiofsd: rename unref_inode() to unref_inode_lolocked()
Posted by Daniel P. Berrangé 5 years, 11 months ago
On Thu, Dec 12, 2019 at 04:38:29PM +0000, Dr. David Alan Gilbert (git) wrote:
> From: Miklos Szeredi <mszeredi@redhat.com>
> 
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tools/virtiofsd/passthrough_ll.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|