diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-07-06 08:10:37 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-07-06 20:03:05 +0000 |
commit | f9e59bcba2cff580a3ccf62e89460f9eed295d89 (patch) | |
tree | 0b1409174fa9e2be92b8b34b810749138f66dbee /fs/cifs/connect.c | |
parent | b2a0fa152072f0085fa8d8eb0dbf9b3b0c5952fc (diff) | |
download | linux-f9e59bcba2cff580a3ccf62e89460f9eed295d89.tar.bz2 |
cifs: have cifs_cleanup_volume_info not take a double pointer
...as that makes for a cumbersome interface. Make it take a regular
smb_vol pointer and rely on the caller to zero it out if needed.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 44376ce41e42..dd064075ddfb 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2831,14 +2831,11 @@ is_path_accessible(int xid, struct cifs_tcon *tcon, } void -cifs_cleanup_volume_info(struct smb_vol **pvolume_info) +cifs_cleanup_volume_info(struct smb_vol *volume_info) { - struct smb_vol *volume_info; - - if (!pvolume_info || !*pvolume_info) + if (!volume_info) return; - volume_info = *pvolume_info; kfree(volume_info->username); kzfree(volume_info->password); kfree(volume_info->UNC); @@ -2847,7 +2844,6 @@ cifs_cleanup_volume_info(struct smb_vol **pvolume_info) kfree(volume_info->iocharset); kfree(volume_info->prepath); kfree(volume_info); - *pvolume_info = NULL; return; } @@ -2990,7 +2986,7 @@ int cifs_setup_volume_info(struct smb_vol **pvolume_info, char *mount_data, *pvolume_info = volume_info; return rc; out: - cifs_cleanup_volume_info(&volume_info); + cifs_cleanup_volume_info(volume_info); return rc; } |