aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLeann Ogasawara <leann.ogasawara@canonical.com>2011-08-15 13:04:02 -0700
committerJohn Rigby <john.rigby@linaro.org>2011-11-16 14:25:27 -0700
commit105ac4c79c9d4bb1136b35a98a78cdc8b91fd897 (patch)
treec9faec462a932b3cfc88a88e79d1c461682d8f79 /fs
parentad6d43a67b8ad9d4c9f72c2d76bf5adf2095e92c (diff)
downloadlinux-linaro-precise-105ac4c79c9d4bb1136b35a98a78cdc8b91fd897.tar.gz
Revert "UBUNTU: ubuntu: overlayfs -- ovl: improve stack use of lookup and readdir"
This reverts commit beb0e0d9ca7db7d3b4e416089b1ef35efabb752d.
Diffstat (limited to 'fs')
-rw-r--r--fs/overlayfs/dir.c11
-rw-r--r--fs/overlayfs/overlayfs.h3
-rw-r--r--fs/overlayfs/readdir.c6
-rw-r--r--fs/overlayfs/super.c15
4 files changed, 17 insertions, 18 deletions
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index 834bed88c9b..966db6bad86 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -15,6 +15,17 @@
static const char *ovl_whiteout_symlink = "(overlay-whiteout)";
+static struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
+ struct nameidata *nd)
+{
+ int err = ovl_do_lookup(dentry);
+
+ if (err)
+ return ERR_PTR(err);
+
+ return NULL;
+}
+
static int ovl_whiteout(struct dentry *upperdir, struct dentry *dentry)
{
int err;
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index bf45bd42e9a..10c4c3697b1 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -33,8 +33,7 @@ bool ovl_dentry_is_opaque(struct dentry *dentry);
void ovl_dentry_set_opaque(struct dentry *dentry, bool opaque);
bool ovl_is_whiteout(struct dentry *dentry);
void ovl_dentry_update(struct dentry *dentry, struct dentry *upperdentry);
-struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
- struct nameidata *nd);
+int ovl_do_lookup(struct dentry *dentry);
struct dentry *ovl_upper_create(struct dentry *upperdir, struct dentry *dentry,
struct kstat *stat, const char *link);
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 48e35a83116..4f0a51c39c3 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -165,8 +165,8 @@ static int ovl_fill_upper(void *buf, const char *name, int namelen,
return ovl_cache_entry_add_rb(rdd, name, namelen, ino, d_type);
}
-static inline int ovl_dir_read(struct path *realpath,
- struct ovl_readdir_data *rdd, filldir_t filler)
+static int ovl_dir_read(struct path *realpath, struct ovl_readdir_data *rdd,
+ filldir_t filler)
{
struct file *realfile;
int err;
@@ -246,7 +246,7 @@ static int ovl_dir_mark_whiteouts(struct ovl_readdir_data *rdd)
return 0;
}
-static inline int ovl_dir_read_merged(struct path *upperpath, struct path *lowerpath,
+static int ovl_dir_read_merged(struct path *upperpath, struct path *lowerpath,
struct ovl_readdir_data *rdd)
{
int err;
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 427bb555020..c741b17835a 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -248,7 +248,7 @@ static struct ovl_entry *ovl_alloc_entry(void)
return kzalloc(sizeof(struct ovl_entry), GFP_KERNEL);
}
-static inline struct dentry *ovl_lookup_real(struct dentry *dir, struct qstr *name)
+static struct dentry *ovl_lookup_real(struct dentry *dir, struct qstr *name)
{
struct dentry *dentry;
@@ -266,7 +266,7 @@ static inline struct dentry *ovl_lookup_real(struct dentry *dir, struct qstr *na
return dentry;
}
-static int ovl_do_lookup(struct dentry *dentry)
+int ovl_do_lookup(struct dentry *dentry)
{
struct ovl_entry *oe;
struct dentry *upperdir;
@@ -363,17 +363,6 @@ out:
return err;
}
-struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
- struct nameidata *nd)
-{
- int err = ovl_do_lookup(dentry);
-
- if (err)
- return ERR_PTR(err);
-
- return NULL;
-}
-
static void ovl_put_super(struct super_block *sb)
{
struct ovl_fs *ufs = sb->s_fs_info;