diff mbox

[v3,12/32] CIFS: Fix a wrong pointer in atomic_open

Message ID 1342166025-29377-13-git-send-email-pshilovsky@samba.org (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Shilovsky July 13, 2012, 7:53 a.m. UTC
Commit 8ce5c35dd353cbf533383c54dca8aa7d2da6950f caused a regression
in cifs open codepath.

Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
---
 fs/cifs/dir.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Comments

Pavel Shilovsky July 24, 2012, 4:59 p.m. UTC | #1
2012/7/13 Pavel Shilovsky <pshilovsky@samba.org>:
> Commit 8ce5c35dd353cbf533383c54dca8aa7d2da6950f caused a regression
> in cifs open codepath.
>

Since Al Viro rebased his branch one more times from the last time I
rebased on top of it the commit id has changed to
30d904947459cca2beb69e0110716f5248b31f2a.

Steve, can you fix the description or simply reapply the patch from
here (smb2-mount branch - the equivalent of your for-next with a fixed
description of this commit), please:

http://git.altlinux.org/people/piastry/public/?p=cifs-2.6.git;a=commit;h=546bb6548f0659bb55add6b956809928b7ad035b
Jeff Layton July 24, 2012, 5:35 p.m. UTC | #2
On Tue, 24 Jul 2012 20:59:27 +0400
Pavel Shilovsky <pshilovsky@samba.org> wrote:

> 2012/7/13 Pavel Shilovsky <pshilovsky@samba.org>:
> > Commit 8ce5c35dd353cbf533383c54dca8aa7d2da6950f caused a regression
> > in cifs open codepath.
> >
> 
> Since Al Viro rebased his branch one more times from the last time I
> rebased on top of it the commit id has changed to
> 30d904947459cca2beb69e0110716f5248b31f2a.
> 
> Steve, can you fix the description or simply reapply the patch from
> here (smb2-mount branch - the equivalent of your for-next with a fixed
> description of this commit), please:
> 
> http://git.altlinux.org/people/piastry/public/?p=cifs-2.6.git;a=commit;h=546bb6548f0659bb55add6b956809928b7ad035b
> 

Patch looks correct...

Reviewed-by: Jeff Layton <jlayton@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Layton July 24, 2012, 7:22 p.m. UTC | #3
On Fri, 13 Jul 2012 11:53:25 +0400
Pavel Shilovsky <pshilovsky@samba.org> wrote:

> Commit 8ce5c35dd353cbf533383c54dca8aa7d2da6950f caused a regression
> in cifs open codepath.
> 
> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
> ---
>  fs/cifs/dir.c |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> index d364654..2caba0b 100644
> --- a/fs/cifs/dir.c
> +++ b/fs/cifs/dir.c
> @@ -387,7 +387,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
>  	struct cifs_tcon *tcon;
>  	__u16 fileHandle;
>  	__u32 oplock;
> -	struct file *filp;
>  	struct cifsFileInfo *pfile_info;
>  
>  	/* Posix open is only called (at lookup time) for file create now.  For
> @@ -418,7 +417,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
>  	     inode, direntry->d_name.name, direntry);
>  
>  	tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
> -	filp = ERR_CAST(tlink);
>  	if (IS_ERR(tlink))
>  		goto out_free_xid;
>  
> @@ -436,10 +434,9 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
>  		goto out;
>  	}
>  
> -	pfile_info = cifs_new_fileinfo(fileHandle, filp, tlink, oplock);
> +	pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock);
>  	if (pfile_info == NULL) {
>  		CIFSSMBClose(xid, tcon, fileHandle);
> -		fput(filp);
>  		rc = -ENOMEM;
>  	}
>  

Looks correct -- important to get this in for 3.6.

Reviewed-by: Jeff Layton <jlayton@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Steve French July 24, 2012, 7:24 p.m. UTC | #4
On Tue, Jul 24, 2012 at 2:22 PM, Jeff Layton <jlayton@redhat.com> wrote:
> On Fri, 13 Jul 2012 11:53:25 +0400
> Pavel Shilovsky <pshilovsky@samba.org> wrote:
>
>> Commit 8ce5c35dd353cbf533383c54dca8aa7d2da6950f caused a regression
>> in cifs open codepath.
>>
>> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
>> ---
>>  fs/cifs/dir.c |    5 +----
>>  1 files changed, 1 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
>> index d364654..2caba0b 100644
>> --- a/fs/cifs/dir.c
>> +++ b/fs/cifs/dir.c
>> @@ -387,7 +387,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
>>       struct cifs_tcon *tcon;
>>       __u16 fileHandle;
>>       __u32 oplock;
>> -     struct file *filp;
>>       struct cifsFileInfo *pfile_info;
>>
>>       /* Posix open is only called (at lookup time) for file create now.  For
>> @@ -418,7 +417,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
>>            inode, direntry->d_name.name, direntry);
>>
>>       tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
>> -     filp = ERR_CAST(tlink);
>>       if (IS_ERR(tlink))
>>               goto out_free_xid;
>>
>> @@ -436,10 +434,9 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
>>               goto out;
>>       }
>>
>> -     pfile_info = cifs_new_fileinfo(fileHandle, filp, tlink, oplock);
>> +     pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock);
>>       if (pfile_info == NULL) {
>>               CIFSSMBClose(xid, tcon, fileHandle);
>> -             fput(filp);
>>               rc = -ENOMEM;
>>       }
>>
>
> Looks correct -- important to get this in for 3.6.
>
> Reviewed-by: Jeff Layton <jlayton@redhat.com>

Yes - merged and in the cifs-2.6.git for-next branch already
diff mbox

Patch

diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index d364654..2caba0b 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -387,7 +387,6 @@  cifs_atomic_open(struct inode *inode, struct dentry *direntry,
 	struct cifs_tcon *tcon;
 	__u16 fileHandle;
 	__u32 oplock;
-	struct file *filp;
 	struct cifsFileInfo *pfile_info;
 
 	/* Posix open is only called (at lookup time) for file create now.  For
@@ -418,7 +417,6 @@  cifs_atomic_open(struct inode *inode, struct dentry *direntry,
 	     inode, direntry->d_name.name, direntry);
 
 	tlink = cifs_sb_tlink(CIFS_SB(inode->i_sb));
-	filp = ERR_CAST(tlink);
 	if (IS_ERR(tlink))
 		goto out_free_xid;
 
@@ -436,10 +434,9 @@  cifs_atomic_open(struct inode *inode, struct dentry *direntry,
 		goto out;
 	}
 
-	pfile_info = cifs_new_fileinfo(fileHandle, filp, tlink, oplock);
+	pfile_info = cifs_new_fileinfo(fileHandle, file, tlink, oplock);
 	if (pfile_info == NULL) {
 		CIFSSMBClose(xid, tcon, fileHandle);
-		fput(filp);
 		rc = -ENOMEM;
 	}