From 15886177e412db00aa86155fe72608c4ebf5a08f Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Fri, 15 Oct 2010 15:33:59 -0400 Subject: cifs: clean up cifs_reopen_file Add a f_flags field that holds the f_flags field from the filp. We'll need this info in case the filp ever goes away before the cifsFileInfo does. Have cifs_reopen_file use that value instead of filp->f_flags too and have it take a cifsFileInfo arg instead of a filp. While we're at it, get rid of some bogus cargo-cult NULL pointer checks in that function and reduce the level of indentation. Signed-off-by: Jeff Layton Reviewed-by: Suresh Jayaraman Acked-by: Dave Kleikamp Signed-off-by: Steve French --- fs/cifs/dir.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/cifs/dir.c') diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 36cf3e2..3c23d88 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c @@ -147,6 +147,7 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file, pCifsFile->pid = current->tgid; pCifsFile->uid = current_fsuid(); pCifsFile->dentry = dget(dentry); + pCifsFile->f_flags = file->f_flags; pCifsFile->pfile = file; pCifsFile->invalidHandle = false; pCifsFile->closePend = false; -- cgit v1.1