]> git.hungrycats.org Git - linux/commitdiff
[PATCH] NFS: add an fsync() stub for directories as per 2.4.x.
authorTrond Myklebust <trondmy@trondhjem.org>
Fri, 10 Sep 2004 16:19:55 +0000 (09:19 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 10 Sep 2004 16:19:55 +0000 (09:19 -0700)
    Helps to keep the 'sendmail' doctor away.

Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfs/dir.c

index 86c5eda70a803bd03912aca9301245702c067c88..626252aec95a3c2733eb73319c8314e8ba1a2b07 100644 (file)
@@ -51,12 +51,14 @@ static int nfs_link(struct dentry *, struct inode *, struct dentry *);
 static int nfs_mknod(struct inode *, struct dentry *, int, dev_t);
 static int nfs_rename(struct inode *, struct dentry *,
                      struct inode *, struct dentry *);
+static int nfs_fsync_dir(struct file *, struct dentry *, int);
 
 struct file_operations nfs_dir_operations = {
        .read           = generic_read_dir,
        .readdir        = nfs_readdir,
        .open           = nfs_opendir,
        .release        = nfs_release,
+       .fsync          = nfs_fsync_dir,
 };
 
 struct inode_operations nfs_dir_inode_operations = {
@@ -492,6 +494,15 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
        return 0;
 }
 
+/*
+ * All directory operations under NFS are synchronous, so fsync()
+ * is a dummy operation.
+ */
+int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync)
+{
+       return 0;
+}
+
 /*
  * A check for whether or not the parent directory has changed.
  * In the case it has, we assume that the dentries are untrustworthy