blob: 2569c9a658ae77c432c5660a9c174de7b2ad0dbf [file] [log] [blame]
From aaditya.kumar.30@gmail.com Fri Dec 21 15:43:41 2012
From: Aaditya Kumar <aaditya.kumar.30@gmail.com>
Date: Sat, 22 Dec 2012 05:13:40 +0530
Subject: AXFS: fix build failure due to undefined symbol kern_path_parent()
To: Greg KH <gregkh@linuxfoundation.org>
Cc: ltsi-dev@lists.linuxfoundation.org, tim.bird@am.sony.com, frank.rowand@am.sony.com, takuzo.ohara@ap.sony.com, amit.agarwal@ap.sony.com, kan.iibuchi@jp.sony.com, Aaditya Kumar <aaditya.kumar@ap.sony.com>
Message-ID: <CAEtiSasvwemeCYkjeagSPb-chs=cDeNeH1jJqVRxW0qnomij8Q@mail.gmail.com>
This patch fixes following build failure when axfs is compiled
as a module. The build failure is caused by
Commit-ID: a7e526129f6ea298513ef4ce7aa6db08fc069d14
ERROR: "kern_path_parent" [fs/axfs/axfs.ko] undefined!
Signed-off-by: Aaditya Kumar <aaditya.kumar@ap.sony.com>
---
Changes from v2:
- Address checkpatch.pl errors.
Changes from v1:
- AXFS should not be using kernel_path() or kenel_path_parent() and
actually there is no need for these functions, we can do without these
functions also, so change the mounting code to not use it.
---
fs/axfs/axfs_bdev.c | 18 ------------------
fs/axfs/axfs_super.c | 10 ++++++----
2 files changed, 6 insertions(+), 22 deletions(-)
--- a/fs/axfs/axfs_bdev.c
+++ b/fs/axfs/axfs_bdev.c
@@ -94,24 +94,6 @@ void axfs_copy_block(struct super_block
}
}
-int axfs_is_dev_bdev(char *path)
-{
- struct nameidata nd;
- int ret = false;
-
- if (!path)
- return false;
- nd.flags |= LOOKUP_FOLLOW;
- if (kern_path_parent(path, &nd))
- return false;
-
- if (S_ISBLK(nd.path.dentry->d_inode->i_mode))
- ret = true;
-
- path_put(&nd.path);
- return ret;
-}
-
int axfs_verify_bdev_sizes(struct super_block *sb, int *err)
{
u64 io_dev_size;
--- a/fs/axfs/axfs_super.c
+++ b/fs/axfs/axfs_super.c
@@ -754,6 +754,7 @@ axfs_get_sb_address(struct file_system_t
{
int mtdnr;
char *sd = sbi->second_dev;
+ struct dentry *dp = NULL;
if (sbi->phys_start_addr == 0)
return false;
@@ -767,11 +768,12 @@ axfs_get_sb_address(struct file_system_t
if (axfs_is_dev_mtd(sd, &mtdnr))
return axfs_get_sb_mtd(fs_type, flags, sd, sbi);
- else if (axfs_is_dev_bdev(sd))
- return axfs_get_sb_bdev(fs_type, flags, sd, sbi);
- else
- return mount_nodev(fs_type, flags, sbi, axfs_fill_super);
+ dp = axfs_get_sb_bdev(fs_type, flags, sd, sbi);
+ if (!IS_ERR_OR_NULL(dp))
+ return dp;
+
+ return mount_nodev(fs_type, flags, sbi, axfs_fill_super);
}
/* helpers for parse_axfs_options */