Commit d81dce00 authored by Pavel Shilovsky's avatar Pavel Shilovsky

Fix missing share flags during creating for 2.6.33

parent d7521042
......@@ -318,6 +318,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
oflags = FMODE_READ;
if (tcon->unix_ext && (tcon->ses->capabilities & CAP_UNIX) &&
((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) &&
(CIFS_UNIX_POSIX_PATH_OPS_CAP &
le64_to_cpu(tcon->fsUnixInfo.Capability))) {
rc = cifs_posix_open(full_path, &newinode, nd->path.mnt,
......@@ -380,7 +381,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS)
rc = CIFSSMBOpen(xid, tcon, full_path, disposition,
desiredAccess, FILE_SHARE_ALL, create_options,
desiredAccess, ~((oflags>>21) & 7), create_options,
&fileHandle, &oplock, buf, cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
else
......@@ -676,6 +677,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
*/
if (pTcon->unix_ext) {
if (nd && !(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY)) &&
((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0) &&
(nd->flags & LOOKUP_OPEN) && !pTcon->broken_posix_open &&
(nd->intent.open.flags & O_CREAT)) {
rc = cifs_posix_open(full_path, &newInode, nd->path.mnt,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment