[Patch] More unnecessary assignments in fs/cifs/file.c (fwd)

From: Jesper Juhl
Date: Sun Jan 02 2005 - 07:00:48 EST



Hi Steve,

Chris Clayton send me the patch below and asked if I could forward it for
him.
Since Chris' original patch was whitespace damaged I've rediffed it
against 2.6.10-bk4

I've kept Chris' comments on the patch below but substituted his original
with my re-diffed version and added my own Signed-off-by line since the
patch looks good to me.


---------- Forwarded message ----------
Date: Fri, 31 Dec 2004 16:58:33 +0000
From: Chris Clayton <chris_clayton@xxxxxxxxxxxxxx>
To: juhl-lkml@xxxxxx
Subject: [Patch] More unnecessary assignments in fs/cifs/file.c

<text irrelevant to the patch snipped>

I saw the patch you submitted ealier this week to remove two unnecessary
assignments from fs/cifs/file.c. Whilst looking over the original source
file, I think I've spotted two more of these assignments. The patch below is
against virgin 2.6.10 (i.e it doesn't have your earlier whitespace patch
applied), so you may have to fix it up a bit to get it to apply to your tree.

Thanks,

Chris

Signed-off-by: Chris Clayton <chris_clayton@xxxxxxxxxxxxxx>
Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>


--- linux-2.6.10-bk4-orig/fs/cifs/file.c 2004-12-24 22:33:48.000000000 +0100
+++ linux-2.6.10-bk4/fs/cifs/file.c 2005-01-02 12:56:13.000000000 +0100
@@ -73,9 +73,8 @@ cifs_open(struct inode *inode, struct fi
}
read_unlock(&GlobalSMBSeslock);
if(file->private_data != NULL) {
- rc = 0;
FreeXid(xid);
- return rc;
+ return 0;
} else {
if(file->f_flags & O_EXCL)
cERROR(1,("could not find file instance for new file %p ",file));
@@ -1952,9 +1951,8 @@ cifs_readdir(struct file *file, void *di
data = kmalloc(bufsize, GFP_KERNEL);
pfindData = (FILE_DIRECTORY_INFO *) data;
if(data == NULL) {
- rc = -ENOMEM;
FreeXid(xid);
- return rc;
+ return -ENOMEM;
}
down(&file->f_dentry->d_sb->s_vfs_rename_sem);
full_path = build_wildcard_path_from_dentry(file->f_dentry);



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/