diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index df3d152f0493..88002e45a6b4 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -332,7 +332,7 @@ static int usbfs_unlink (struct inode *dir, struct dentry *dentry) | |||
332 | { | 332 | { |
333 | struct inode *inode = dentry->d_inode; | 333 | struct inode *inode = dentry->d_inode; |
334 | mutex_lock(&inode->i_mutex); | 334 | mutex_lock(&inode->i_mutex); |
335 | dentry->d_inode->i_nlink--; | 335 | drop_nlink(dentry->d_inode); |
336 | dput(dentry); | 336 | dput(dentry); |
337 | mutex_unlock(&inode->i_mutex); | 337 | mutex_unlock(&inode->i_mutex); |
338 | d_delete(dentry); | 338 | d_delete(dentry); |
@@ -347,10 +347,11 @@ static int usbfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
347 | mutex_lock(&inode->i_mutex); | 347 | mutex_lock(&inode->i_mutex); |
348 | dentry_unhash(dentry); | 348 | dentry_unhash(dentry); |
349 | if (usbfs_empty(dentry)) { | 349 | if (usbfs_empty(dentry)) { |
350 | dentry->d_inode->i_nlink -= 2; | 350 | drop_nlink(dentry->d_inode); |
351 | drop_nlink(dentry->d_inode); | ||
351 | dput(dentry); | 352 | dput(dentry); |
352 | inode->i_flags |= S_DEAD; | 353 | inode->i_flags |= S_DEAD; |
353 | dir->i_nlink--; | 354 | drop_nlink(dir); |
354 | error = 0; | 355 | error = 0; |
355 | } | 356 | } |
356 | mutex_unlock(&inode->i_mutex); | 357 | mutex_unlock(&inode->i_mutex); |