]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/namei.c
locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_...
[mirror_ubuntu-bionic-kernel.git] / fs / namei.c
index c75ea03ca147ec81977f67929b7f4489b90cf42e..40a0f34bf990b89dad2c380b57470fef57eb3236 100644 (file)
@@ -1209,7 +1209,7 @@ static int follow_managed(struct path *path, struct nameidata *nd)
        /* Given that we're not holding a lock here, we retain the value in a
         * local variable for each dentry as we look at it so that we don't see
         * the components of that value change under us */
-       while (managed = ACCESS_ONCE(path->dentry->d_flags),
+       while (managed = READ_ONCE(path->dentry->d_flags),
               managed &= DCACHE_MANAGED_DENTRY,
               unlikely(managed != 0)) {
                /* Allow the filesystem to manage the transit without i_mutex
@@ -1394,7 +1394,7 @@ int follow_down(struct path *path)
        unsigned managed;
        int ret;
 
-       while (managed = ACCESS_ONCE(path->dentry->d_flags),
+       while (managed = READ_ONCE(path->dentry->d_flags),
               unlikely(managed & DCACHE_MANAGED_DENTRY)) {
                /* Allow the filesystem to manage the transit without i_mutex
                 * being held.