On Fri, Feb 15, 2002 at 12:16:29PM -0800, Greg KH wrote:
> [EMAIL PROTECTED], 2002-02-15 12:00:16-08:00, [EMAIL PROTECTED]
> usb usbfs:
> - fixes based on Pat Mochel's latest driverfs fixes based on Al Viro's
>comments :)
>
> drivers/usb/inode.c | 51 ---------------------------------------------------
> 1 files changed, 51 deletions(-)
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.346 -> 1.347
# drivers/usb/inode.c 1.17 -> 1.18
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/02/15 [EMAIL PROTECTED] 1.347
# usb usbfs:
# - fixes based on Pat Mochel's latest driverfs fixes based on Al Viro's
comments :)
# --------------------------------------------
#
diff -Nru a/drivers/usb/inode.c b/drivers/usb/inode.c
--- a/drivers/usb/inode.c Fri Feb 15 12:15:06 2002
+++ b/drivers/usb/inode.c Fri Feb 15 12:15:06 2002
@@ -40,7 +40,6 @@
#include <asm/byteorder.h>
static struct super_operations usbfs_ops;
-static struct address_space_operations usbfs_aops;
static struct file_operations usbfs_dir_operations;
static struct file_operations default_file_operations;
static struct inode_operations usbfs_dir_inode_operations;
@@ -168,7 +167,6 @@
inode->i_blksize = PAGE_CACHE_SIZE;
inode->i_blocks = 0;
inode->i_rdev = NODEV;
- inode->i_mapping->a_ops = &usbfs_aops;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
switch (mode & S_IFMT) {
default:
@@ -186,7 +184,6 @@
return inode;
}
-/* SMP-safe */
static int usbfs_mknod (struct inode *dir, struct dentry *dentry, int mode,
int dev)
{
@@ -211,21 +208,6 @@
return usbfs_mknod (dir, dentry, mode | S_IFREG, 0);
}
-static int usbfs_link (struct dentry *old_dentry, struct inode *dir,
- struct dentry *dentry)
-{
- struct inode *inode = old_dentry->d_inode;
-
- if(S_ISDIR(inode->i_mode))
- return -EPERM;
-
- inode->i_nlink++;
- atomic_inc(&inode->i_count);
- dget(dentry);
- d_instantiate(dentry, inode);
- return 0;
-}
-
static inline int usbfs_positive (struct dentry *dentry)
{
return dentry->d_inode && !d_unhashed(dentry);
@@ -256,31 +238,13 @@
if (usbfs_empty(dentry)) {
struct inode *inode = dentry->d_inode;
- lock_kernel();
inode->i_nlink--;
- unlock_kernel();
dput(dentry);
error = 0;
}
return error;
}
-static int usbfs_rename (struct inode *old_dir, struct dentry *old_dentry,
- struct inode *new_dir, struct dentry *new_dentry)
-{
- int error = -ENOTEMPTY;
-
- if (usbfs_empty(new_dentry)) {
- struct inode *inode = new_dentry->d_inode;
- if (inode) {
- inode->i_nlink--;
- dput(new_dentry);
- }
- error = 0;
- }
- return error;
-}
-
#define usbfs_rmdir usbfs_unlink
/* default file operations */
@@ -329,19 +293,9 @@
return 0;
}
-static int default_sync_file (struct file *file, struct dentry *dentry,
- int datasync)
-{
- return 0;
-}
-
-static struct address_space_operations usbfs_aops = {
-};
-
static struct file_operations usbfs_dir_operations = {
read: generic_read_dir,
readdir: dcache_readdir,
- fsync: default_sync_file,
};
static struct file_operations default_file_operations = {
@@ -349,19 +303,14 @@
write: default_write_file,
open: default_open,
llseek: default_file_lseek,
- fsync: default_sync_file,
- mmap: generic_file_mmap,
};
static struct inode_operations usbfs_dir_inode_operations = {
create: usbfs_create,
lookup: usbfs_lookup,
- link: usbfs_link,
unlink: usbfs_unlink,
mkdir: usbfs_mkdir,
rmdir: usbfs_rmdir,
- mknod: usbfs_mknod,
- rename: usbfs_rename,
};
static struct super_operations usbfs_ops = {
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel