The patch titled ecryptfs: Rewrite ecryptfs_fsync() has been added to the -mm tree. Its filename is ecryptfs-rewrite-ecryptfs_fsync.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ecryptfs: Rewrite ecryptfs_fsync() From: Mike Halcrow <mhalcrow@xxxxxxxxxx> Rewrite ecryptfs_fsync() to be more concise. Note that i_fop is always valid. Signed-off-by: Michael Halcrow <mhalcrow@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ecryptfs/file.c | 29 ++++++++--------------------- 1 files changed, 8 insertions(+), 21 deletions(-) diff -puN fs/ecryptfs/file.c~ecryptfs-rewrite-ecryptfs_fsync fs/ecryptfs/file.c --- 25/fs/ecryptfs/file.c~ecryptfs-rewrite-ecryptfs_fsync Fri May 26 13:48:16 2006 +++ 25-akpm/fs/ecryptfs/file.c Fri May 26 13:48:16 2006 @@ -322,29 +322,16 @@ static int ecryptfs_release(struct inode static int ecryptfs_fsync(struct file *file, struct dentry *dentry, int datasync) { + struct file *lower_file = ecryptfs_file_to_lower(file); + struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); + struct inode *lower_inode = lower_dentry->d_inode; int rc = -EINVAL; - struct file *lower_file = NULL; - struct dentry *lower_dentry; - if (!file) { - lower_dentry = ecryptfs_dentry_to_lower(dentry); - if (lower_dentry->d_inode->i_fop - && lower_dentry->d_inode->i_fop->fsync) { - mutex_lock(&lower_dentry->d_inode->i_mutex); - rc = lower_dentry->d_inode->i_fop->fsync(lower_file, - lower_dentry, - datasync); - mutex_unlock(&lower_dentry->d_inode->i_mutex); - } - } else { - lower_file = ecryptfs_file_to_lower(file); - lower_dentry = ecryptfs_dentry_to_lower(dentry); - if (lower_file->f_op && lower_file->f_op->fsync) { - mutex_lock(&lower_dentry->d_inode->i_mutex); - rc = lower_file->f_op->fsync(lower_file, lower_dentry, - datasync); - mutex_unlock(&lower_dentry->d_inode->i_mutex); - } + if (lower_inode->i_fop->fsync) { + mutex_lock(&lower_inode->i_mutex); + rc = lower_inode->i_fop->fsync(lower_file, lower_dentry, + datasync); + mutex_unlock(&lower_inode->i_mutex); } return rc; } _ Patches currently in -mm which might be from mhalcrow@xxxxxxxxxx are ecryptfs-fs-makefile-and-fs-kconfig.patch ecryptfs-documentation.patch ecryptfs-makefile.patch ecryptfs-main-module-functions.patch ecryptfs-main-module-functions-uint16_t-u16.patch ecryptfs-header-declarations.patch ecryptfs-header-declarations-update.patch ecryptfs-header-declarations-update-convert-signed-data-types-to-unsigned-data-types.patch ecryptfs-header-declarations-remove-unnecessary-ifndefs.patch ecryptfs-superblock-operations.patch ecryptfs-dentry-operations.patch ecryptfs-file-operations.patch ecryptfs-file-operations-remove-null-==-syntax.patch ecryptfs-file-operations-remove-extraneous-read-of-inode-size-from-header.patch ecryptfs-file-operations-fix.patch ecryptfs-inode-operations.patch ecryptfs-mmap-operations.patch mark-address_space_operations-const-vs-ecryptfs-mmap-operations.patch ecryptfs-keystore.patch ecryptfs-crypto-functions.patch ecryptfs-debug-functions.patch ecryptfs-alpha-build-fix.patch ecryptfs-convert-assert-to-bug_on.patch ecryptfs-remove-unnecessary-null-checks.patch ecryptfs-rewrite-ecryptfs_fsync.patch ecryptfs-overhaul-file-locking.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html