The patch titled ecryptfs: Rewrite ecryptfs_fsync() has been removed from the -mm tree. Its filename is ecryptfs-rewrite-ecryptfs_fsync.patch This patch was dropped because it was folded into ecryptfs-fs-makefile-and-fs-kconfig.patch ------------------------------------------------------ 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 file changed, 8 insertions(+), 21 deletions(-) diff -puN fs/ecryptfs/file.c~ecryptfs-rewrite-ecryptfs_fsync fs/ecryptfs/file.c --- a/fs/ecryptfs/file.c~ecryptfs-rewrite-ecryptfs_fsync +++ a/fs/ecryptfs/file.c @@ -326,29 +326,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 origin.patch ecryptfs-fs-makefile-and-fs-kconfig.patch ecryptfs-rewrite-ecryptfs_fsync.patch ecryptfs-overhaul-file-locking.patch ecryptfs-remove-lock-propagation.patch ecryptfs-dont-muck-with-the-existing-nameidata-structures.patch ecryptfs-asm-scatterlisth-linux-scatterlisth.patch ecryptfs-support-for-larger-maximum-key-size.patch ecryptfs-add-codes-for-additional-ciphers.patch ecryptfs-unencrypted-key-size-based-on-encrypted-key-size.patch ecryptfs-packet-and-key-management-update-for-variable-key-size.patch ecryptfs-add-ecryptfs_-prefix-to-mount-options-key-size-parameter.patch ecryptfs-set-the-key-size-from-the-default-for-the-mount.patch ecryptfs-check-for-weak-keys.patch ecryptfs-add-define-values-for-cipher-codes-from-rfc2440-openpgp.patch ecryptfs-convert-bits-to-bytes.patch ecryptfs-more-elegant-aes-key-size-manipulation.patch ecryptfs-more-intelligent-use-of-tfm-objects.patch ecryptfs-remove-debugging-cruft.patch ecryptfs-get_sb_dev-fix.patch ecryptfs-validate-minimum-header-extent-size.patch ecryptfs-validate-body-size.patch ecryptfs-validate-packet-length-prior-to-parsing-add-comments.patch ecryptfs-use-the-passed-in-max-value-as-the-upper-bound.patch ecryptfs-change-the-maximum-size-check-when-writing-header.patch ecryptfs-print-the-actual-option-that-is-problematic.patch ecryptfs-add-a-maintainers-entry.patch ecryptfs-partial-signed-integer-to-size_t-conversion-updated-ii.patch ecryptfs-graceful-handling-of-mount-error.patch ecryptfs-fix-printk-format-warnings.patch ecryptfs-associate-vfsmount-with-dentry-rather-than-superblock.patch ecryptfs-mntput-lower-mount-on-umount_begin.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers-ecryptfs.patch make-kmem_cache_destroy-return-void-ecryptfs.patch ecryptfs-inode-numbering-fixes.patch ecryptfs-versioning-fixes.patch ecryptfs-versioning-fixes-tidy.patch ecryptfs-grab-lock-on-lower_page-in-ecryptfs_sync_page.patch ecryptfs-enable-plaintext-passthrough.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