diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 2ba4c41be972..5f1f7682256b 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -298,10 +298,12 @@ int cifs_open(struct inode *inode, struct file *file) | |||
298 | (CIFS_UNIX_POSIX_PATH_OPS_CAP & | 298 | (CIFS_UNIX_POSIX_PATH_OPS_CAP & |
299 | le64_to_cpu(tcon->fsUnixInfo.Capability))) { | 299 | le64_to_cpu(tcon->fsUnixInfo.Capability))) { |
300 | int oflags = (int) cifs_posix_convert_flags(file->f_flags); | 300 | int oflags = (int) cifs_posix_convert_flags(file->f_flags); |
301 | oflags |= SMB_O_CREAT; | ||
301 | /* can not refresh inode info since size could be stale */ | 302 | /* can not refresh inode info since size could be stale */ |
302 | rc = cifs_posix_open(full_path, &inode, file->f_path.mnt, | 303 | rc = cifs_posix_open(full_path, &inode, file->f_path.mnt, |
303 | cifs_sb->mnt_file_mode /* ignored */, | 304 | inode->i_sb, |
304 | oflags, &oplock, &netfid, xid); | 305 | cifs_sb->mnt_file_mode /* ignored */, |
306 | oflags, &oplock, &netfid, xid); | ||
305 | if (rc == 0) { | 307 | if (rc == 0) { |
306 | cFYI(1, "posix open succeeded"); | 308 | cFYI(1, "posix open succeeded"); |
307 | /* no need for special case handling of setting mode | 309 | /* no need for special case handling of setting mode |
@@ -513,8 +515,9 @@ reopen_error_exit: | |||
513 | int oflags = (int) cifs_posix_convert_flags(file->f_flags); | 515 | int oflags = (int) cifs_posix_convert_flags(file->f_flags); |
514 | /* can not refresh inode info since size could be stale */ | 516 | /* can not refresh inode info since size could be stale */ |
515 | rc = cifs_posix_open(full_path, NULL, file->f_path.mnt, | 517 | rc = cifs_posix_open(full_path, NULL, file->f_path.mnt, |
516 | cifs_sb->mnt_file_mode /* ignored */, | 518 | inode->i_sb, |
517 | oflags, &oplock, &netfid, xid); | 519 | cifs_sb->mnt_file_mode /* ignored */, |
520 | oflags, &oplock, &netfid, xid); | ||
518 | if (rc == 0) { | 521 | if (rc == 0) { |
519 | cFYI(1, "posix reopen succeeded"); | 522 | cFYI(1, "posix reopen succeeded"); |
520 | goto reopen_success; | 523 | goto reopen_success; |