patch-2.3.32 linux/fs/super.c
Next file: linux/fs/sysv/namei.c
Previous file: linux/fs/romfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 68
- Date:
Fri Dec 10 09:23:24 1999
- Orig file:
v2.3.31/linux/fs/super.c
- Orig date:
Tue Nov 23 22:42:21 1999
diff -u --recursive --new-file v2.3.31/linux/fs/super.c linux/fs/super.c
@@ -58,10 +58,9 @@
int max_super_blocks = NR_SUPER;
LIST_HEAD(super_blocks);
-static struct file_system_type *file_systems = (struct file_system_type *) NULL;
-struct vfsmount *vfsmntlist = (struct vfsmount *) NULL;
-static struct vfsmount *vfsmnttail = (struct vfsmount *) NULL,
- *mru_vfsmnt = (struct vfsmount *) NULL;
+static struct file_system_type *file_systems = NULL;
+struct vfsmount *vfsmntlist = NULL;
+static struct vfsmount *vfsmnttail = NULL, *mru_vfsmnt = NULL;
/*
* This part handles the management of the list of mounted filesystems.
@@ -70,23 +69,19 @@
{
struct vfsmount *lptr;
- if (vfsmntlist == (struct vfsmount *)NULL)
- return ((struct vfsmount *)NULL);
+ if (vfsmntlist == NULL)
+ return NULL;
- if (mru_vfsmnt != (struct vfsmount *)NULL &&
- mru_vfsmnt->mnt_dev == dev)
+ if (mru_vfsmnt != NULL && mru_vfsmnt->mnt_dev == dev)
return (mru_vfsmnt);
- for (lptr = vfsmntlist;
- lptr != (struct vfsmount *)NULL;
- lptr = lptr->mnt_next)
+ for (lptr = vfsmntlist; lptr != NULL; lptr = lptr->mnt_next)
if (lptr->mnt_dev == dev) {
mru_vfsmnt = lptr;
return (lptr);
}
- return ((struct vfsmount *)NULL);
- /* NOTREACHED */
+ return NULL;
}
static struct vfsmount *add_vfsmnt(struct super_block *sb,
@@ -140,7 +135,7 @@
{
struct vfsmount *lptr, *tofree;
- if (vfsmntlist == (struct vfsmount *)NULL)
+ if (vfsmntlist == NULL)
return;
lptr = vfsmntlist;
if (lptr->mnt_dev == dev) {
@@ -149,13 +144,13 @@
if (vfsmnttail->mnt_dev == dev)
vfsmnttail = vfsmntlist;
} else {
- while (lptr->mnt_next != (struct vfsmount *)NULL) {
+ while (lptr->mnt_next != NULL) {
if (lptr->mnt_next->mnt_dev == dev)
break;
lptr = lptr->mnt_next;
}
tofree = lptr->mnt_next;
- if (tofree == (struct vfsmount *)NULL)
+ if (tofree == NULL)
return;
lptr->mnt_next = lptr->mnt_next->mnt_next;
if (vfsmnttail->mnt_dev == dev)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)