diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/dcache.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index eb7c7255470c..bce851dc03ef 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
| @@ -500,8 +500,7 @@ static void __dentry_kill(struct dentry *dentry) | |||
| 500 | * If ref is non-zero, then decrement the refcount too. | 500 | * If ref is non-zero, then decrement the refcount too. |
| 501 | * Returns dentry requiring refcount drop, or NULL if we're done. | 501 | * Returns dentry requiring refcount drop, or NULL if we're done. |
| 502 | */ | 502 | */ |
| 503 | static struct dentry * | 503 | static struct dentry *dentry_kill(struct dentry *dentry) |
| 504 | dentry_kill(struct dentry *dentry, int unlock_on_failure) | ||
| 505 | __releases(dentry->d_lock) | 504 | __releases(dentry->d_lock) |
| 506 | { | 505 | { |
| 507 | struct inode *inode = dentry->d_inode; | 506 | struct inode *inode = dentry->d_inode; |
| @@ -523,10 +522,8 @@ dentry_kill(struct dentry *dentry, int unlock_on_failure) | |||
| 523 | return parent; | 522 | return parent; |
| 524 | 523 | ||
| 525 | failed: | 524 | failed: |
| 526 | if (unlock_on_failure) { | 525 | spin_unlock(&dentry->d_lock); |
| 527 | spin_unlock(&dentry->d_lock); | 526 | cpu_relax(); |
| 528 | cpu_relax(); | ||
| 529 | } | ||
| 530 | return dentry; /* try again with same dentry */ | 527 | return dentry; /* try again with same dentry */ |
| 531 | } | 528 | } |
| 532 | 529 | ||
| @@ -615,7 +612,7 @@ repeat: | |||
| 615 | return; | 612 | return; |
| 616 | 613 | ||
| 617 | kill_it: | 614 | kill_it: |
| 618 | dentry = dentry_kill(dentry, 1); | 615 | dentry = dentry_kill(dentry); |
| 619 | if (dentry) | 616 | if (dentry) |
| 620 | goto repeat; | 617 | goto repeat; |
| 621 | } | 618 | } |
