From: Steve French Date: Thu, 6 Oct 2005 02:32:49 +0000 (-0700) Subject: [CIFS] cleanup sparse and compile errors in previous fix X-Git-Tag: v2.6.15-rc1~18^2~35^2~5^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd99cd803d460576cf84f012786ff39814b73f7f;p=linux-2.6 [CIFS] cleanup sparse and compile errors in previous fix Signed-off-by: Steve French (sfrench@us.ibm.com) --- diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 0f66ae5b69..39b23f4fa6 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -907,9 +907,10 @@ static ssize_t cifs_write(struct file *file, const char *write_data, return total_written; } -static struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode) +struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode) { struct cifsFileInfo *open_file; + int rc; read_lock(&GlobalSMBSeslock); list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { @@ -920,7 +921,7 @@ static struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode) (open_file->pfile->f_flags & O_WRONLY))) { read_unlock(&GlobalSMBSeslock); if(open_file->invalidHandle) { - rc = cifs_reopen_file(cifs_inode->vfs_inode, + rc = cifs_reopen_file(&cifs_inode->vfs_inode, open_file->pfile, FALSE); /* if it fails, try another handle - might be */ /* dangerous to hold up writepages with retry */ diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 49efdefcff..ff4d1cc7c2 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -962,7 +962,6 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) struct cifsTconInfo *pTcon; char *full_path = NULL; int rc = -EACCES; - int found = FALSE; struct cifsFileInfo *open_file = NULL; FILE_BASIC_INFO time_buf; int set_time = FALSE; @@ -970,7 +969,6 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) __u64 uid = 0xFFFFFFFFFFFFFFFFULL; __u64 gid = 0xFFFFFFFFFFFFFFFFULL; struct cifsInodeInfo *cifsInode; - struct list_head *tmp; xid = GetXid();