-1, -1, local_nls); */
if(direntry->d_inode) {
direntry->d_inode->i_mode = mode;
+ direntry->d_inode->i_mode |= S_IFDIR;
if(cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_SET_UID) {
direntry->d_inode->i_uid =
current->fsgid;
}
}
+ }
}
kfree(full_path);
FreeXid(xid);
cifs_sb = CIFS_SB(direntry->d_inode->i_sb);
pTcon = cifs_sb->tcon;
- if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM == 0) {
+ if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) {
/* check if we have permission to change attrs */
rc = inode_change_ok(direntry->d_inode, attrs);
if(rc < 0) {
/* BB check if we need to refresh inode from server now ? BB */
/* need to flush data before changing file size on server */
- filemap_fdatawrite(direntry->d_inode->i_mapping);
- filemap_fdatawait(direntry->d_inode->i_mapping);
+ filemap_write_and_wait(direntry->d_inode->i_mapping);
if (attrs->ia_valid & ATTR_SIZE) {
/* To avoid spurious oplock breaks from server, in the case of