diff options
| -rw-r--r-- | fs/autofs4/waitq.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index eeb246845909..2341375386f8 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c | |||
| @@ -297,20 +297,14 @@ static int validate_request(struct autofs_wait_queue **wait, | |||
| 297 | */ | 297 | */ |
| 298 | if (notify == NFY_MOUNT) { | 298 | if (notify == NFY_MOUNT) { |
| 299 | /* | 299 | /* |
| 300 | * If the dentry isn't hashed just go ahead and try the | 300 | * If the dentry was successfully mounted while we slept |
| 301 | * mount again with a new wait (not much else we can do). | 301 | * on the wait queue mutex we can return success. If it |
| 302 | */ | 302 | * isn't mounted (doesn't have submounts for the case of |
| 303 | if (!d_unhashed(dentry)) { | 303 | * a multi-mount with no mount at it's base) we can |
| 304 | /* | 304 | * continue on and create a new request. |
| 305 | * But if the dentry is hashed, that means that we | 305 | */ |
| 306 | * got here through the revalidate path. Thus, we | 306 | if (have_submounts(dentry)) |
| 307 | * need to check if the dentry has been mounted | 307 | return 0; |
| 308 | * while we waited on the wq_mutex. If it has, | ||
| 309 | * simply return success. | ||
| 310 | */ | ||
| 311 | if (d_mountpoint(dentry)) | ||
| 312 | return 0; | ||
| 313 | } | ||
| 314 | } | 308 | } |
| 315 | 309 | ||
| 316 | return 1; | 310 | return 1; |
