]> git.karo-electronics.de Git - mv-sheeva.git/commit
cifs: keep dentry reference in cifsFileInfo instead of inode reference
authorJeff Layton <jlayton@redhat.com>
Mon, 11 Oct 2010 19:07:18 +0000 (15:07 -0400)
committerSteve French <sfrench@us.ibm.com>
Tue, 12 Oct 2010 18:06:42 +0000 (18:06 +0000)
commita5e18bc36e9e05ce0338d370a2ce4290910e43ea
tree9d8b37c1dd20267c372ff8c98850eeb2f204449b
parent1c456013e96f10915578dc61095d19b4906f64ac
cifs: keep dentry reference in cifsFileInfo instead of inode reference

cifsFileInfo is a bit problematic. It contains a reference back to the
struct file itself. This makes it difficult for a cifsFileInfo to exist
without a corresponding struct file.

It would be better instead of the cifsFileInfo just held info pertaining
to the open file on the server instead without any back refrences to the
struct file. This would allow it to exist after the filp to which it was
originally attached was closed.

Much of the use of the file pointer in this struct is to get at the
dentry.  Begin divorcing the cifsFileInfo from the struct file by
keeping a reference to the dentry. Since the dentry will have a
reference to the inode, we can eliminate the "pInode" field too and
convert the igrab/iput to dget/dput.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsglob.h
fs/cifs/dir.c
fs/cifs/file.c
fs/cifs/misc.c