• Jeff Layton's avatar
    cifs: keep dentry reference in cifsFileInfo instead of inode reference · a5e18bc3
    Jeff Layton authored
    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: default avatarJeff Layton <jlayton@redhat.com>
    Reviewed-by: default avatarSuresh Jayaraman <sjayaraman@suse.de>
    Acked-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    a5e18bc3
dir.c 23.7 KB