lockref.count is unsigned int on vz7 kernels
so backport of upstream commit c2338f2dc7c1e9
"lock_parent: don't step on stale->d_parent of all-but-freed one"
requires correction.

Fixes vz7 commit "ms/lock_parent() needs to recheck if dentry got
__dentry_kill'ed under it"

Signed-off-by: Vasily Averin <[email protected]>
---
 fs/dcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index a9a3bb52f1b7..41e8f55bd364 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -722,7 +722,7 @@ again:
        }
        if (parent != dentry) {
                spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
-               if (unlikely(dentry->d_lockref.count < 0)) {
+               if (unlikely((int)dentry->d_lockref.count < 0)) {
                        spin_unlock(&parent->d_lock);
                        parent = NULL;
                }
-- 
2.17.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to