Commit 72d63211 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

autofs: do not create dentries for indirect mount on bind-mounts

This was a silly mistake: bind-mounts share the same superblock, thus dentry
creation on a bind-monut will fail with EEXIST.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Tested-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1d79f6e9
...@@ -547,19 +547,10 @@ static int autofs_create_dentries(const struct mount_info *mi, char *mnt_path) ...@@ -547,19 +547,10 @@ static int autofs_create_dentries(const struct mount_info *mi, char *mnt_path)
static int autofs_populate_mount(const struct mount_info *mi, static int autofs_populate_mount(const struct mount_info *mi,
const AutofsEntry *entry) const AutofsEntry *entry)
{ {
struct mount_info *b;
if (entry->mode != AUTOFS_MODE_INDIRECT) if (entry->mode != AUTOFS_MODE_INDIRECT)
return 0; return 0;
if (autofs_create_dentries(mi, mi->mountpoint) < 0) return autofs_create_dentries(mi, mi->mountpoint);
return -1;
list_for_each_entry(b, &mi->mnt_bind, mnt_bind) {
if (autofs_create_dentries(b, mi->mountpoint) < 0)
return -1;
}
return 0;
} }
static int autofs_post_mount(const char *mnt_path, dev_t mnt_dev, static int autofs_post_mount(const char *mnt_path, dev_t mnt_dev,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment