Commit 84d08fa888e7c2d53b5bbc764db2ef02968b499c
1 parent
74b9272bbe
Exists in
master
and in
20 other branches
helper for reading ->d_count
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 12 changed files with 22 additions and 17 deletions Side-by-side Diff
drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h
fs/autofs4/expire.c
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 | |
110 | 110 | spin_lock_nested(&q->d_lock, DENTRY_D_LOCK_NESTED); |
111 | 111 | /* Already gone or negative dentry (under construction) - try next */ |
112 | - if (q->d_count == 0 || !simple_positive(q)) { | |
112 | + if (!d_count(q) || !simple_positive(q)) { | |
113 | 113 | spin_unlock(&q->d_lock); |
114 | 114 | next = q->d_u.d_child.next; |
115 | 115 | goto cont; |
... | ... | @@ -267,7 +267,7 @@ |
267 | 267 | else |
268 | 268 | ino_count++; |
269 | 269 | |
270 | - if (p->d_count > ino_count) { | |
270 | + if (d_count(p) > ino_count) { | |
271 | 271 | top_ino->last_used = jiffies; |
272 | 272 | dput(p); |
273 | 273 | return 1; |
... | ... | @@ -409,7 +409,7 @@ |
409 | 409 | if (!exp_leaves) { |
410 | 410 | /* Path walk currently on this dentry? */ |
411 | 411 | ino_count = atomic_read(&ino->count) + 1; |
412 | - if (dentry->d_count > ino_count) | |
412 | + if (d_count(dentry) > ino_count) | |
413 | 413 | goto next; |
414 | 414 | |
415 | 415 | if (!autofs4_tree_busy(mnt, dentry, timeout, do_now)) { |
... | ... | @@ -423,7 +423,7 @@ |
423 | 423 | } else { |
424 | 424 | /* Path walk currently on this dentry? */ |
425 | 425 | ino_count = atomic_read(&ino->count) + 1; |
426 | - if (dentry->d_count > ino_count) | |
426 | + if (d_count(dentry) > ino_count) | |
427 | 427 | goto next; |
428 | 428 | |
429 | 429 | expired = autofs4_check_leaves(mnt, dentry, timeout, do_now); |
fs/autofs4/root.c
fs/ceph/inode.c
... | ... | @@ -903,8 +903,8 @@ |
903 | 903 | } else if (realdn) { |
904 | 904 | dout("dn %p (%d) spliced with %p (%d) " |
905 | 905 | "inode %p ino %llx.%llx\n", |
906 | - dn, dn->d_count, | |
907 | - realdn, realdn->d_count, | |
906 | + dn, d_count(dn), | |
907 | + realdn, d_count(realdn), | |
908 | 908 | realdn->d_inode, ceph_vinop(realdn->d_inode)); |
909 | 909 | dput(dn); |
910 | 910 | dn = realdn; |
fs/ceph/mds_client.c
... | ... | @@ -1553,7 +1553,7 @@ |
1553 | 1553 | *base = ceph_ino(temp->d_inode); |
1554 | 1554 | *plen = len; |
1555 | 1555 | dout("build_path on %p %d built %llx '%.*s'\n", |
1556 | - dentry, dentry->d_count, *base, len, path); | |
1556 | + dentry, d_count(dentry), *base, len, path); | |
1557 | 1557 | return path; |
1558 | 1558 | } |
1559 | 1559 |
fs/coda/dir.c
fs/ecryptfs/inode.c
... | ... | @@ -358,7 +358,7 @@ |
358 | 358 | |
359 | 359 | lower_mnt = mntget(ecryptfs_dentry_to_lower_mnt(dentry->d_parent)); |
360 | 360 | fsstack_copy_attr_atime(dir_inode, lower_dentry->d_parent->d_inode); |
361 | - BUG_ON(!lower_dentry->d_count); | |
361 | + BUG_ON(!d_count(lower_dentry)); | |
362 | 362 | |
363 | 363 | ecryptfs_set_dentry_private(dentry, dentry_info); |
364 | 364 | ecryptfs_set_dentry_lower(dentry, lower_dentry); |
fs/locks.c
... | ... | @@ -1454,7 +1454,7 @@ |
1454 | 1454 | if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0)) |
1455 | 1455 | goto out; |
1456 | 1456 | if ((arg == F_WRLCK) |
1457 | - && ((dentry->d_count > 1) | |
1457 | + && ((d_count(dentry) > 1) | |
1458 | 1458 | || (atomic_read(&inode->i_count) > 1))) |
1459 | 1459 | goto out; |
1460 | 1460 |
fs/nfs/dir.c
... | ... | @@ -1721,7 +1721,7 @@ |
1721 | 1721 | dir->i_ino, dentry->d_name.name); |
1722 | 1722 | |
1723 | 1723 | spin_lock(&dentry->d_lock); |
1724 | - if (dentry->d_count > 1) { | |
1724 | + if (d_count(dentry) > 1) { | |
1725 | 1725 | spin_unlock(&dentry->d_lock); |
1726 | 1726 | /* Start asynchronous writeout of the inode */ |
1727 | 1727 | write_inode_now(dentry->d_inode, 0); |
... | ... | @@ -1866,7 +1866,7 @@ |
1866 | 1866 | dfprintk(VFS, "NFS: rename(%s/%s -> %s/%s, ct=%d)\n", |
1867 | 1867 | old_dentry->d_parent->d_name.name, old_dentry->d_name.name, |
1868 | 1868 | new_dentry->d_parent->d_name.name, new_dentry->d_name.name, |
1869 | - new_dentry->d_count); | |
1869 | + d_count(new_dentry)); | |
1870 | 1870 | |
1871 | 1871 | /* |
1872 | 1872 | * For non-directories, check whether the target is busy and if so, |
... | ... | @@ -1884,7 +1884,7 @@ |
1884 | 1884 | rehash = new_dentry; |
1885 | 1885 | } |
1886 | 1886 | |
1887 | - if (new_dentry->d_count > 2) { | |
1887 | + if (d_count(new_dentry) > 2) { | |
1888 | 1888 | int err; |
1889 | 1889 | |
1890 | 1890 | /* copy the target dentry's name */ |
fs/nfs/unlink.c
fs/nilfs2/super.c
include/linux/dcache.h