aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 41000305d716..ae6ebb88ceff 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -542,7 +542,7 @@ EXPORT_SYMBOL(d_drop);
542 * If ref is non-zero, then decrement the refcount too. 542 * If ref is non-zero, then decrement the refcount too.
543 * Returns dentry requiring refcount drop, or NULL if we're done. 543 * Returns dentry requiring refcount drop, or NULL if we're done.
544 */ 544 */
545static inline struct dentry * 545static struct dentry *
546dentry_kill(struct dentry *dentry, int unlock_on_failure) 546dentry_kill(struct dentry *dentry, int unlock_on_failure)
547 __releases(dentry->d_lock) 547 __releases(dentry->d_lock)
548{ 548{
@@ -630,7 +630,8 @@ repeat:
630 goto kill_it; 630 goto kill_it;
631 } 631 }
632 632
633 dentry->d_flags |= DCACHE_REFERENCED; 633 if (!(dentry->d_flags & DCACHE_REFERENCED))
634 dentry->d_flags |= DCACHE_REFERENCED;
634 dentry_lru_add(dentry); 635 dentry_lru_add(dentry);
635 636
636 dentry->d_lockref.count--; 637 dentry->d_lockref.count--;
@@ -1331,14 +1332,6 @@ rename_retry:
1331 * list is non-empty and continue searching. 1332 * list is non-empty and continue searching.
1332 */ 1333 */
1333 1334
1334/**
1335 * have_submounts - check for mounts over a dentry
1336 * @parent: dentry to check.
1337 *
1338 * Return true if the parent or its subdirectories contain
1339 * a mount point
1340 */
1341
1342static enum d_walk_ret check_mount(void *data, struct dentry *dentry) 1335static enum d_walk_ret check_mount(void *data, struct dentry *dentry)
1343{ 1336{
1344 int *ret = data; 1337 int *ret = data;
@@ -1349,6 +1342,13 @@ static enum d_walk_ret check_mount(void *data, struct dentry *dentry)
1349 return D_WALK_CONTINUE; 1342 return D_WALK_CONTINUE;
1350} 1343}
1351 1344
1345/**
1346 * have_submounts - check for mounts over a dentry
1347 * @parent: dentry to check.
1348 *
1349 * Return true if the parent or its subdirectories contain
1350 * a mount point
1351 */
1352int have_submounts(struct dentry *parent) 1352int have_submounts(struct dentry *parent)
1353{ 1353{
1354 int ret = 0; 1354 int ret = 0;