Update of /cvsroot/linux-vax/kernel-2.4/fs/autofs4
In directory usw-pr-cvs1:/tmp/cvs-serv24187/autofs4
Modified Files:
expire.c init.c inode.c
Log Message:
synch 2.4.15 commit 6
Index: expire.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs4/expire.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- expire.c 14 Jan 2001 16:40:50 -0000 1.1.1.1
+++ expire.c 9 Apr 2002 12:57:26 -0000 1.2
@@ -66,19 +66,11 @@
non-busy mounts */
static int check_vfsmnt(struct vfsmount *mnt, struct dentry *dentry)
{
- int ret = 0;
- struct list_head *tmp;
-
- list_for_each(tmp, &dentry->d_vfsmnt) {
- struct vfsmount *vfs = list_entry(tmp, struct vfsmount,
- mnt_clash);
- DPRINTK(("check_vfsmnt: mnt=%p, dentry=%p, tmp=%p, vfs=%p\n",
- mnt, dentry, tmp, vfs));
- if (vfs->mnt_parent != mnt || /* don't care about busy-ness of other namespaces */
- !is_vfsmnt_tree_busy(vfs))
- ret++;
- }
+ int ret = dentry->d_mounted;
+ struct vfsmount *vfs = lookup_mnt(mnt, dentry);
+ if (vfs && is_vfsmnt_tree_busy(vfs))
+ ret--;
DPRINTK(("check_vfsmnt: ret=%d\n", ret));
return ret;
}
@@ -98,8 +90,6 @@
top, count));
this_parent = top;
- count--; /* top is passed in after being dgot */
-
if (is_autofs4_dentry(top)) {
count--;
DPRINTK(("is_tree_busy: autofs; count=%d\n", count));
@@ -168,8 +158,6 @@
unsigned long timeout;
struct dentry *root = sb->s_root;
struct list_head *tmp;
- struct dentry *d;
- struct vfsmount *p;
if (!sbi->exp_timeout || !root)
return NULL;
@@ -208,23 +196,17 @@
attempts if expire fails the first time */
ino->last_used = now;
}
- p = mntget(mnt);
- d = dget_locked(dentry);
-
- if (!is_tree_busy(p, d)) {
+ if (!is_tree_busy(mnt, dentry)) {
DPRINTK(("autofs_expire: returning %p %.*s\n",
dentry, (int)dentry->d_name.len, dentry->d_name.name));
/* Start from here next time */
list_del(&root->d_subdirs);
list_add(&root->d_subdirs, &dentry->d_child);
+ dget(dentry);
spin_unlock(&dcache_lock);
- dput(d);
- mntput(p);
return dentry;
}
- dput(d);
- mntput(p);
}
spin_unlock(&dcache_lock);
@@ -251,6 +233,7 @@
pkt.len = dentry->d_name.len;
memcpy(pkt.name, dentry->d_name.name, pkt.len);
pkt.name[pkt.len] = '\0';
+ dput(dentry);
if ( copy_to_user(pkt_p, &pkt, sizeof(struct autofs_packet_expire)) )
return -EFAULT;
@@ -278,6 +261,7 @@
de_info->flags |= AUTOFS_INF_EXPIRING;
ret = autofs4_wait(sbi, &dentry->d_name, NFY_EXPIRE);
de_info->flags &= ~AUTOFS_INF_EXPIRING;
+ dput(dentry);
}
return ret;
Index: init.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs4/init.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- init.c 14 Jan 2001 16:40:50 -0000 1.1.1.1
+++ init.c 9 Apr 2002 12:57:26 -0000 1.2
@@ -28,3 +28,4 @@
module_init(init_autofs4_fs)
module_exit(exit_autofs4_fs)
+MODULE_LICENSE("GPL");
Index: inode.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/fs/autofs4/inode.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- inode.c 25 Feb 2001 23:14:48 -0000 1.1.1.2
+++ inode.c 9 Apr 2002 12:57:26 -0000 1.2
@@ -315,8 +315,10 @@
inode->i_nlink = 2;
inode->i_op = &autofs4_dir_inode_operations;
inode->i_fop = &autofs4_dir_operations;
- } else if (S_ISLNK(inf->mode))
+ } else if (S_ISLNK(inf->mode)) {
+ inode->i_size = inf->size;
inode->i_op = &autofs4_symlink_inode_operations;
+ }
return inode;
}
|