summaryrefslogtreecommitdiffstats
path: root/fs/cifs/link.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-09-02 11:30:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-09-02 11:30:10 -0700
commit5b716ac728bcc01b1f2a7ed6e437196602237c27 (patch)
treeb2c31c641ca04b72218e00ffebc07d3e8fe303f4 /fs/cifs/link.c
parent0b1a34c992853ecb47daa5be598d7ed2930342dc (diff)
parentea7b4887e7266b93fa0c203cc452a926a0fef4f0 (diff)
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French. * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Fix cifs_do_create error hadnling cifs: print error code if smb signature verification fails CIFS: Fix log messages in packet checking for SMB2 CIFS: Protect i_nlink from being negative
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r--fs/cifs/link.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 09e4b3ae456..e6ce3b11287 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -433,7 +433,9 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
if (old_file->d_inode) {
cifsInode = CIFS_I(old_file->d_inode);
if (rc == 0) {
+ spin_lock(&old_file->d_inode->i_lock);
inc_nlink(old_file->d_inode);
+ spin_unlock(&old_file->d_inode->i_lock);
/* BB should we make this contingent on superblock flag NOATIME? */
/* old_file->d_inode->i_ctime = CURRENT_TIME;*/
/* parent dir timestamps will update from srv