/* needed for writepage */
pCifsFile->pfile = file;
-
+
file->private_data = pCifsFile;
break;
}
rc = -EBADF;
goto reopen_error_exit;
}
-
+
cifs_sb = CIFS_SB(inode->i_sb);
pTcon = cifs_sb->tcon;
posix_lock_type = CIFS_RDLCK;
else
posix_lock_type = CIFS_WRLCK;
-
+
if (numUnlock == 1)
posix_lock_type = CIFS_UNLCK;
if (file->private_data == NULL)
return -EBADF;
open_file = (struct cifsFileInfo *) file->private_data;
-
+
xid = GetXid();
if (*poffset > file->f_path.dentry->d_inode->i_size)
if (file->private_data == NULL)
return -EBADF;
open_file = (struct cifsFileInfo *)file->private_data;
-
+
xid = GetXid();
if (*poffset > file->f_path.dentry->d_inode->i_size)
/* if it fails, try another handle - might be */
/* dangerous to hold up writepages with retry */
if (rc) {
- cFYI(1, ("failed on reopen file in wp"));
+ cFYI(1,
+ ("failed on reopen file in wp"));
read_lock(&GlobalSMBSeslock);
/* can not use this handle, no write
pending on this one after all */
int xid;
cifs_sb = CIFS_SB(mapping->host->i_sb);
-
+
/*
* If wsize is smaller that the page cache size, default to writing
* one page at a time via cifs_writepage
cFYI(1, ("Sync file - name: %s datasync: 0x%x",
dentry->d_name.name, datasync));
-
+
rc = filemap_fdatawrite(inode->i_mapping);
if (rc == 0)
CIFS_I(inode)->write_behind_rc = 0;
rc = filemap_fdatawrite(inode->i_mapping);
if (!rc) /* reset wb rc if we were able to write out dirty pages */
CIFS_I(inode)->write_behind_rc = 0;
-
+
cFYI(1, ("Flush inode %p file %p rc %d", inode, file, rc));
return rc;
if (cifsInode)
open_file = find_writable_file(cifsInode);
-
+
if (open_file) {
struct cifs_sb_info *cifs_sb;