# 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.360 -> 1.361 # drivers/usb/inode.c 1.20 -> 1.21 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/02/18 greg@kroah.com 1.361 # usbdevfs: # - put back locks that I accidentally took out with the last merge. # -------------------------------------------- # diff -Nru a/drivers/usb/inode.c b/drivers/usb/inode.c --- a/drivers/usb/inode.c Mon Feb 18 21:26:23 2002 +++ b/drivers/usb/inode.c Mon Feb 18 21:26:23 2002 @@ -184,6 +184,7 @@ return inode; } +/* SMP-safe */ static int usbfs_mknod (struct inode *dir, struct dentry *dentry, int mode, int dev) { @@ -238,7 +239,9 @@ if (usbfs_empty(dentry)) { struct inode *inode = dentry->d_inode; + lock_kernel(); inode->i_nlink--; + unlock_kernel(); dput(dentry); error = 0; }