[Patch] More unnecessary assignments in fs/cifs/file.c (fwd)
Jesper Juhl
juhl-lkml at dif.dk
Sun Jan 2 12:10:50 GMT 2005
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 at f1internet.com>
To: juhl-lkml at dif.dk
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 at f1internet.com>
Signed-off-by: Jesper Juhl <juhl-lkml at dif.dk>
--- 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);
More information about the samba-technical
mailing list