From 41e4f3d8270e25b5cac62cce60259efbf22a627a Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Fri, 10 Sep 2004 09:19:55 -0700 Subject: [PATCH] [PATCH] NFS: add an fsync() stub for directories as per 2.4.x. Helps to keep the 'sendmail' doctor away. Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds --- fs/nfs/dir.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 86c5eda70a803..626252aec95a3 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -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 -- 2.53.0