cifs: add cifs_revalidate_file

Previous thread: Blackfin: update defconfigs by Linux Kernel Mailing List on Thursday, March 18, 2010 - 6:02 pm. (1 message)

Next thread: cifs: add a CIFSSMBQFileInfo function by Linux Kernel Mailing List on Friday, March 19, 2010 - 9:59 am. (1 message)
From: Linux Kernel Mailing List
Date: Friday, March 19, 2010 - 9:59 am

Gitweb:     http://git.kernel.org/linus/abab095d1fd25986b910d3c46289d8fa3582cdc5
Commit:     abab095d1fd25986b910d3c46289d8fa3582cdc5
Parent:     c8634fd3115497ac311f57be9c12f993437745cf
Author:     Jeff Layton <jlayton@redhat.com>
AuthorDate: Fri Feb 12 07:44:18 2010 -0500
Committer:  Steve French <sfrench@us.ibm.com>
CommitDate: Tue Mar 9 20:22:53 2010 +0000

    cifs: add cifs_revalidate_file
    
    ...to allow updating inode attributes on an existing inode by
    filehandle. Change mmap and llseek codepaths to use that
    instead of cifs_revalidate_dentry since they have a filehandle
    readily available.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Steve French <sfrench@us.ibm.com>
---
 fs/cifs/cifsfs.c    |    2 +-
 fs/cifs/cifsfs.h    |    1 +
 fs/cifs/cifsproto.h |    2 +
 fs/cifs/file.c      |    3 +-
 fs/cifs/inode.c     |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 91 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index cf85a41..5183bc2 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -639,7 +639,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
 		   setting the revalidate time to zero */
 		CIFS_I(file->f_path.dentry->d_inode)->time = 0;
 
-		retval = cifs_revalidate_dentry(file->f_path.dentry);
+		retval = cifs_revalidate_file(file);
 		if (retval < 0)
 			return (loff_t)retval;
 	}
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index 2af995c..7aa57ec 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -61,6 +61,7 @@ extern int cifs_mkdir(struct inode *, struct dentry *, int);
 extern int cifs_rmdir(struct inode *, struct dentry *);
 extern int cifs_rename(struct inode *, struct dentry *, struct inode *,
 		       struct dentry *);
+extern int cifs_revalidate_file(struct file *filp);
 extern int cifs_revalidate_dentry(struct dentry *);
 extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat ...
Previous thread: Blackfin: update defconfigs by Linux Kernel Mailing List on Thursday, March 18, 2010 - 6:02 pm. (1 message)

Next thread: cifs: add a CIFSSMBQFileInfo function by Linux Kernel Mailing List on Friday, March 19, 2010 - 9:59 am. (1 message)