From 700df12adde8f15d77574863f00d31573e8d2a32 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Tue, 26 Nov 2013 23:03:46 -0500 Subject: [PATCH] Wrapfs: remove unnecessary initializations Signed-off-by: Erez Zadok --- fs/wrapfs/file.c | 5 +++-- fs/wrapfs/inode.c | 10 +++++----- fs/wrapfs/lookup.c | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fs/wrapfs/file.c b/fs/wrapfs/file.c index dc6f2a442637..ccf47978babb 100644 --- a/fs/wrapfs/file.c +++ b/fs/wrapfs/file.c @@ -31,7 +31,8 @@ static ssize_t wrapfs_read(struct file *file, char __user *buf, static ssize_t wrapfs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { - int err = 0; + int err; + struct file *lower_file; struct dentry *dentry = file->f_path.dentry; @@ -50,7 +51,7 @@ static ssize_t wrapfs_write(struct file *file, const char __user *buf, static int wrapfs_readdir(struct file *file, struct dir_context *ctx) { - int err = 0; + int err; struct file *lower_file = NULL; struct dentry *dentry = file->f_path.dentry; diff --git a/fs/wrapfs/inode.c b/fs/wrapfs/inode.c index 75bb82ab7e91..b02a1f6b5b85 100644 --- a/fs/wrapfs/inode.c +++ b/fs/wrapfs/inode.c @@ -14,7 +14,7 @@ static int wrapfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool want_excl) { - int err = 0; + int err; struct dentry *lower_dentry; struct dentry *lower_parent_dentry = NULL; struct path lower_path; @@ -118,7 +118,7 @@ out: static int wrapfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) { - int err = 0; + int err; struct dentry *lower_dentry; struct dentry *lower_parent_dentry = NULL; struct path lower_path; @@ -144,7 +144,7 @@ out: static int wrapfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) { - int err = 0; + int err; struct dentry *lower_dentry; struct dentry *lower_parent_dentry = NULL; struct path lower_path; @@ -203,7 +203,7 @@ out: static int wrapfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) { - int err = 0; + int err; struct dentry *lower_dentry; struct dentry *lower_parent_dentry = NULL; struct path lower_path; @@ -361,7 +361,7 @@ static int wrapfs_permission(struct inode *inode, int mask) static int wrapfs_setattr(struct dentry *dentry, struct iattr *ia) { - int err = 0; + int err; struct dentry *lower_dentry; struct inode *inode; struct inode *lower_inode; diff --git a/fs/wrapfs/lookup.c b/fs/wrapfs/lookup.c index 2483f4fcd0c2..efe5d11953bf 100644 --- a/fs/wrapfs/lookup.c +++ b/fs/wrapfs/lookup.c @@ -271,9 +271,9 @@ out: struct dentry *wrapfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { + int err; struct dentry *ret, *parent; struct path lower_parent_path; - int err = 0; parent = dget_parent(dentry); -- 2.34.1