]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ceph/super.h
ceph: fix improper use of smp_mb__before_atomic()
[mirror_ubuntu-bionic-kernel.git] / fs / ceph / super.h
index c82a4ed9985620a79f43972e49c1b351735c512b..b5fdb3282b09e0f31f35d17ff49c3ff6644d8cf7 100644 (file)
@@ -529,7 +529,12 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci,
                                           long long release_count,
                                           long long ordered_count)
 {
-       smp_mb__before_atomic();
+       /*
+        * Makes sure operations that setup readdir cache (update page
+        * cache and i_size) are strongly ordered w.r.t. the following
+        * atomic64_set() operations.
+        */
+       smp_mb();
        atomic64_set(&ci->i_complete_seq[0], release_count);
        atomic64_set(&ci->i_complete_seq[1], ordered_count);
 }