cifs: timeout dfs automounts +little fix.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Bu işleme şunda yer alıyor:

işlemeyi yapan:
Al Viro

ebeveyn
b69d3987f4
işleme
78d31a3a87
@@ -25,14 +25,26 @@
|
||||
|
||||
static LIST_HEAD(cifs_dfs_automount_list);
|
||||
|
||||
/*
|
||||
* DFS functions
|
||||
*/
|
||||
static void cifs_dfs_expire_automounts(struct work_struct *work);
|
||||
static DECLARE_DELAYED_WORK(cifs_dfs_automount_task,
|
||||
cifs_dfs_expire_automounts);
|
||||
static int cifs_dfs_mountpoint_expiry_timeout = 500 * HZ;
|
||||
|
||||
void dfs_shrink_umount_helper(struct vfsmount *vfsmnt)
|
||||
static void cifs_dfs_expire_automounts(struct work_struct *work)
|
||||
{
|
||||
mark_mounts_for_expiry(&cifs_dfs_automount_list);
|
||||
mark_mounts_for_expiry(&cifs_dfs_automount_list);
|
||||
struct list_head *list = &cifs_dfs_automount_list;
|
||||
|
||||
mark_mounts_for_expiry(list);
|
||||
if (!list_empty(list))
|
||||
schedule_delayed_work(&cifs_dfs_automount_task,
|
||||
cifs_dfs_mountpoint_expiry_timeout);
|
||||
}
|
||||
|
||||
void cifs_dfs_release_automount_timer(void)
|
||||
{
|
||||
BUG_ON(!list_empty(&cifs_dfs_automount_list));
|
||||
cancel_delayed_work(&cifs_dfs_automount_task);
|
||||
flush_scheduled_work();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -261,10 +273,11 @@ static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd,
|
||||
err = do_add_mount(newmnt, nd, nd->path.mnt->mnt_flags, mntlist);
|
||||
switch (err) {
|
||||
case 0:
|
||||
dput(nd->path.dentry);
|
||||
mntput(nd->path.mnt);
|
||||
path_put(&nd->path);
|
||||
nd->path.mnt = newmnt;
|
||||
nd->path.dentry = dget(newmnt->mnt_root);
|
||||
schedule_delayed_work(&cifs_dfs_automount_task,
|
||||
cifs_dfs_mountpoint_expiry_timeout);
|
||||
break;
|
||||
case -EBUSY:
|
||||
/* someone else made a mount here whilst we were busy */
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle