diff options
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r-- | fs/cifs/link.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 2ec6037f61c7..252e672d5604 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -586,12 +586,12 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, | |||
586 | * if source file is cached (oplocked) revalidate will not go to server | 586 | * if source file is cached (oplocked) revalidate will not go to server |
587 | * until the file is closed or oplock broken so update nlinks locally | 587 | * until the file is closed or oplock broken so update nlinks locally |
588 | */ | 588 | */ |
589 | if (old_file->d_inode) { | 589 | if (d_really_is_positive(old_file)) { |
590 | cifsInode = CIFS_I(old_file->d_inode); | 590 | cifsInode = CIFS_I(d_inode(old_file)); |
591 | if (rc == 0) { | 591 | if (rc == 0) { |
592 | spin_lock(&old_file->d_inode->i_lock); | 592 | spin_lock(&d_inode(old_file)->i_lock); |
593 | inc_nlink(old_file->d_inode); | 593 | inc_nlink(d_inode(old_file)); |
594 | spin_unlock(&old_file->d_inode->i_lock); | 594 | spin_unlock(&d_inode(old_file)->i_lock); |
595 | 595 | ||
596 | /* | 596 | /* |
597 | * parent dir timestamps will update from srv within a | 597 | * parent dir timestamps will update from srv within a |
@@ -629,7 +629,7 @@ cifs_hl_exit: | |||
629 | void * | 629 | void * |
630 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | 630 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) |
631 | { | 631 | { |
632 | struct inode *inode = direntry->d_inode; | 632 | struct inode *inode = d_inode(direntry); |
633 | int rc = -ENOMEM; | 633 | int rc = -ENOMEM; |
634 | unsigned int xid; | 634 | unsigned int xid; |
635 | char *full_path = NULL; | 635 | char *full_path = NULL; |