Commit f8659451 authored by Richard Gooch's avatar Richard Gooch

Merge atnf.csiro.au:/workaholix1/kernel/v2.5/linus

into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
parents 44a706d5 ec47835c
......@@ -1957,3 +1957,11 @@ Changes for patch v216
<devfs_get_handle>
- Removed deprecated <devfs_find_handle>
===============================================================================
Changes for patch v217
- Exported <devfs_find_and_unregister> and <devfs_only> to modules
- Updated README from master HTML file
- Fixed module unload race in <devfs_open>
......@@ -3,7 +3,7 @@ Devfs (Device File System) FAQ
Linux Devfs (Device File System) FAQ
Richard Gooch
21-JUL-2002
20-AUG-2002
Document languages:
......@@ -1509,6 +1509,16 @@ Here are some common questions and answers.
Devfsd doesn't start
Make sure you have compiled and installed devfsd
Make sure devfsd is being started from your boot
scripts
Make sure you have configured your kernel to enable devfs (see
below)
Make sure devfs is mounted (see below)
Devfsd is not managing all my permissions
Make sure you are capturing the appropriate events. For example,
......@@ -1777,7 +1787,7 @@ I hate the naming scheme
First, remember that no naming scheme will please everybody. You hate
the scheme, others love it. Who's to say who's right and who's wrong?
Ultimately, the person who writes the code gets to choose, and what
exists now is a combination of the the choices made by the
exists now is a combination of the choices made by the
devfs author and the
kernel maintainer (Linus).
......
......@@ -645,6 +645,9 @@
20020728 Richard Gooch <rgooch@atnf.csiro.au>
Removed deprecated <devfs_find_handle>.
v1.20
20020820 Richard Gooch <rgooch@atnf.csiro.au>
Fixed module unload race in <devfs_open>.
v1.21
*/
#include <linux/types.h>
#include <linux/errno.h>
......@@ -677,7 +680,7 @@
#include <asm/bitops.h>
#include <asm/atomic.h>
#define DEVFS_VERSION "1.20 (20020728)"
#define DEVFS_VERSION "1.21 (20020820)"
#define DEVFS_NAME "devfs"
......@@ -2228,16 +2231,15 @@ const char *devfs_get_name (devfs_handle_t de, unsigned int *namelen)
/**
* devfs_only - returns if "devfs=only" is a boot option
* devfs_only - returns true if "devfs=only" is a boot option
*
* If "devfs=only" this function will return 1, otherwise 0 is returned.
*/
int devfs_only (void)
{
if (boot_options & OPTION_ONLY)
return 1;
return 0;
}
return (boot_options & OPTION_ONLY) ? 1 : 0;
} /* End Function devfs_only */
/**
......@@ -2312,6 +2314,7 @@ EXPORT_SYMBOL(devfs_unregister);
EXPORT_SYMBOL(devfs_mk_symlink);
EXPORT_SYMBOL(devfs_mk_dir);
EXPORT_SYMBOL(devfs_get_handle);
EXPORT_SYMBOL(devfs_find_and_unregister);
EXPORT_SYMBOL(devfs_get_flags);
EXPORT_SYMBOL(devfs_set_flags);
EXPORT_SYMBOL(devfs_get_maj_min);
......@@ -2327,6 +2330,7 @@ EXPORT_SYMBOL(devfs_get_next_sibling);
EXPORT_SYMBOL(devfs_auto_unregister);
EXPORT_SYMBOL(devfs_get_unregister_slave);
EXPORT_SYMBOL(devfs_get_name);
EXPORT_SYMBOL(devfs_only);
/**
......@@ -2382,7 +2386,7 @@ static int check_disc_changed (struct devfs_entry *de)
extern int warn_no_part;
if ( !S_ISBLK (de->mode) ) return 0;
bdev = bdget(kdev_t_to_nr(dev));
bdev = bdget (kdev_t_to_nr (dev) );
if (!bdev) return 0;
bdops = devfs_get_ops (de);
if (!bdops) return 0;
......@@ -2390,7 +2394,7 @@ static int check_disc_changed (struct devfs_entry *de)
/* Ugly hack to disable messages about unable to read partition table */
tmp = warn_no_part;
warn_no_part = 0;
retval = full_check_disk_change(bdev);
retval = full_check_disk_change (bdev);
warn_no_part = tmp;
out:
devfs_put_ops (de);
......@@ -2692,21 +2696,23 @@ static int devfs_open (struct inode *inode, struct file *file)
struct fcb_type *df;
struct devfs_entry *de;
struct fs_info *fs_info = inode->i_sb->u.generic_sbp;
void *ops;
de = get_devfs_entry_from_vfs_inode (inode);
if (de == NULL) return -ENODEV;
if ( S_ISDIR (de->mode) ) return 0;
df = &de->u.fcb;
file->private_data = de->info;
ops = devfs_get_ops (de); /* Now have module refcount */
if ( S_ISBLK (inode->i_mode) )
{
file->f_op = &def_blk_fops;
if (df->ops) inode->i_bdev->bd_op = df->ops;
err = def_blk_fops.open (inode, file);
if (ops) inode->i_bdev->bd_op = ops;
err = def_blk_fops.open (inode, file); /* Module refcount unchanged */
}
else
{
file->f_op = fops_get ( (struct file_operations *) df->ops );
file->f_op = ops;
if (file->f_op)
{
lock_kernel ();
......@@ -2714,7 +2720,7 @@ static int devfs_open (struct inode *inode, struct file *file)
unlock_kernel ();
}
else
{ /* Fallback to legacy scheme */
{ /* Fallback to legacy scheme (I don't have a module refcount) */
if ( S_ISCHR (inode->i_mode) ) err = chrdev_open (inode, file);
else err = -ENODEV;
}
......
......@@ -95,7 +95,6 @@ extern void devfs_auto_unregister (devfs_handle_t master,devfs_handle_t slave);
extern devfs_handle_t devfs_get_unregister_slave (devfs_handle_t master);
extern const char *devfs_get_name (devfs_handle_t de, unsigned int *namelen);
extern int devfs_only (void);
extern void devfs_register_tape (devfs_handle_t de);
extern void devfs_register_series (devfs_handle_t dir, const char *format,
unsigned int num_entries,
......@@ -238,7 +237,6 @@ static inline int devfs_only (void)
{
return 0;
}
static inline void devfs_register_tape (devfs_handle_t de)
{
return;
......
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