diff options
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 89fb72832652..54dce78fbb73 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -129,7 +129,7 @@ cifs_bp_rename_retry: | |||
129 | return full_path; | 129 | return full_path; |
130 | } | 130 | } |
131 | 131 | ||
132 | static int cifs_posix_open(char *full_path, struct inode **pinode, | 132 | int cifs_posix_open(char *full_path, struct inode **pinode, |
133 | struct super_block *sb, int mode, int oflags, | 133 | struct super_block *sb, int mode, int oflags, |
134 | int *poplock, __u16 *pnetfid, int xid) | 134 | int *poplock, __u16 *pnetfid, int xid) |
135 | { | 135 | { |
@@ -187,7 +187,9 @@ static int cifs_posix_open(char *full_path, struct inode **pinode, | |||
187 | if (!pinode) | 187 | if (!pinode) |
188 | goto posix_open_ret; /* caller does not need info */ | 188 | goto posix_open_ret; /* caller does not need info */ |
189 | 189 | ||
190 | *pinode = cifs_new_inode(sb, &presp_data->UniqueId); | 190 | if (*pinode == NULL) |
191 | *pinode = cifs_new_inode(sb, &presp_data->UniqueId); | ||
192 | /* else an inode was passed in. Update its info, don't create one */ | ||
191 | 193 | ||
192 | /* We do not need to close the file if new_inode fails since | 194 | /* We do not need to close the file if new_inode fails since |
193 | the caller will retry qpathinfo as long as inode is null */ | 195 | the caller will retry qpathinfo as long as inode is null */ |
@@ -252,7 +254,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
252 | return -ENOMEM; | 254 | return -ENOMEM; |
253 | } | 255 | } |
254 | 256 | ||
255 | mode &= ~current->fs->umask; | 257 | mode &= ~current_umask(); |
256 | if (oplockEnabled) | 258 | if (oplockEnabled) |
257 | oplock = REQ_OPLOCK; | 259 | oplock = REQ_OPLOCK; |
258 | 260 | ||
@@ -477,7 +479,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, | |||
477 | rc = -ENOMEM; | 479 | rc = -ENOMEM; |
478 | else if (pTcon->unix_ext) { | 480 | else if (pTcon->unix_ext) { |
479 | struct cifs_unix_set_info_args args = { | 481 | struct cifs_unix_set_info_args args = { |
480 | .mode = mode & ~current->fs->umask, | 482 | .mode = mode & ~current_umask(), |
481 | .ctime = NO_CHANGE_64, | 483 | .ctime = NO_CHANGE_64, |
482 | .atime = NO_CHANGE_64, | 484 | .atime = NO_CHANGE_64, |
483 | .mtime = NO_CHANGE_64, | 485 | .mtime = NO_CHANGE_64, |
@@ -699,7 +701,7 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) | |||
699 | return rc; | 701 | return rc; |
700 | } */ | 702 | } */ |
701 | 703 | ||
702 | struct dentry_operations cifs_dentry_ops = { | 704 | const struct dentry_operations cifs_dentry_ops = { |
703 | .d_revalidate = cifs_d_revalidate, | 705 | .d_revalidate = cifs_d_revalidate, |
704 | /* d_delete: cifs_d_delete, */ /* not needed except for debugging */ | 706 | /* d_delete: cifs_d_delete, */ /* not needed except for debugging */ |
705 | }; | 707 | }; |
@@ -737,7 +739,7 @@ static int cifs_ci_compare(struct dentry *dentry, struct qstr *a, | |||
737 | return 1; | 739 | return 1; |
738 | } | 740 | } |
739 | 741 | ||
740 | struct dentry_operations cifs_ci_dentry_ops = { | 742 | const struct dentry_operations cifs_ci_dentry_ops = { |
741 | .d_revalidate = cifs_d_revalidate, | 743 | .d_revalidate = cifs_d_revalidate, |
742 | .d_hash = cifs_ci_hash, | 744 | .d_hash = cifs_ci_hash, |
743 | .d_compare = cifs_ci_compare, | 745 | .d_compare = cifs_ci_compare, |