Age | Commit message (Collapse) | Author |
|
A few members of struct erase_info have been removed and no longer
used in mainline by the following commits. This patches removes
related useless initialization.
8f347c4232d5fc097599b711a3385722a6834005
"mtd: Unconditionally update ->fail_addr and ->addr in part_erase()"
884cfd9023ce6afe8bcf181ec988d8516eb32bf0
"mtd: Stop assuming mtd_erase() is asynchronous"
dcba51bbb9e0cc7f80d36eb20a033a4dff2ce9cc
"mtd: Get rid of unused fields in struct erase_info"
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
i_version in struct inode has changed to atomic64_t in mainline kernel.
This patch handles i_version with proper atomic API.
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The timer callback argument type has been changed by commit 354b46b1a0ad
("timer: Switch callback prototype to take struct timer_list *
argument") and init_timer_on_stack() is also removed by commit
9c6c273aa424 ("timer: Remove init_timer_on_stack() in favor of
timer_setup_on_stack()"). Adjust the codes in yaffs2 according to
these changes.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The nand.h has been renamed to rawnand.h by commit d4092d76a4a4 ("mtd:
nand: Rename nand.h into rawnand.h"), adjust the yaffs2 code according
to this change.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
To fix the following build error:
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_mknod':
fs/yaffs2/yaffs_vfs.c:1252:2: error: implicit declaration of function 'current_fsuid' [-Werror=implicit-function-declaration]
uid_t uid = YCRED_FSUID();
^
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The macro CURRENT_TIME has already been deleted by commit bfe1c566453a
("time: delete CURRENT_TIME_SEC and CURRENT_TIME"). So we need to
replace all the uses of CURRENT_TIME by current_time() for filesystem
times, and ktime_get_* function for others.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The "rename2" of i_op has been renamed to "rename" in commit
2773bf00aeb9("fs: rename "rename2" i_op to "rename""). We do what we
have done in commit 1cd66c93ba8c("fs: make remaining filesystems use .rename2")
for yaffs2 according to this change.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The {get, set, remove}xattr inode operations have been already removed
in commit fd50ecaddf83("vfs: Remove {get,set,remove}xattr inode operations").
Adjust the yaffs2 to use the generic xattr handler.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
In commit cb8e1eef351b ("fs: Give dentry to inode_change_ok() instead
of inode") the inode_change_ok() has been rename to setattr_prepare(),
and one of the argument was also changed from inode to dentry. We
adjust the invocation of inode_change_ok() in Yaffs2 according to
this change.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Fix the following build warning:
fs/yaffs2/yaffs_vfs.c:1788:34: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare]
this_inode, this_type) < 0) {
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
As What we have done in commit fceef393a538 ("switch ->get_link()
to delayed_call, kill ->put_link()")
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
As what we done in commit 6b2553918d8b ("replace ->follow_link()
with new method that could stay in RCU mode").
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Since commit 3767e255b390 ("switch ->setxattr() to passing dentry and
inode separately") and commit ce23e6401334 ("->getxattr(): pass dentry
and inode as separate arguments"), a new inode argument has been added
for these two functions. Adjust these two functions to accommodate to
this change.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
As what we have done in commit 09cbfeaf1a5a ("mm, fs: get rid of
PAGE_CACHE_* and page_cache_{get,release} macros").
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
As what we did in commit 680baacbca69 ("new ->follow_link() and
->put_link() calling conventions").
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
As stated in commit 5d5d56897530 ("make new_sync_{read,write}() static"),
we shouldn't use new_sync_{read_write} for ->read/->write. We should
NULL ->read/->write with non-NULL ->{read,write}_iter will do the
right thing.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Upstream commit 78d28e651f97866d608d9b41f8ad291e65d47dd5 ("kill f_dentry macro")
removed f_dentry from struct file, so replace it to f_path.dentry to fix the
build failure.
Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
For yaffs file system, the mode of reading or writing is restricted at
four pointer where are mnt->mnt_flags,mnt->mnt_sb->s_flags,mtd->flags
and dev->read_only,the first three is used handle file and file
system(eg,remount) operation, and last one(dev->read_only) almost is used
handle checkpoint of yaffs2. However, in current code, the dev->read_only
only can be changed at first time when the yaffs2 file system is mounted,
later it can't be changed again(eg,mount -o remount), the result is that
the checkpoint's saving operation always can't succeed if you set readonly
mode for yaffs2 file system when it is mounted at the first time.
To fix this issue, we implement yaffs_remount_fs() which allows the
rootfs to be remounted as r/w.
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
|
|
when using yaffs2 filesystem, after umounting, yaffs_put_super
function doesn't free the context_os memory, it is malloced in
yaffs_internal_read_super.
unreferenced object 0xd9103980 (size 64):
comm "mount", pid 5694, jiffies 159571 (age 45.150s)
hex dump (first 32 bytes):
80 39 10 d9 80 39 10 d9 00 b0 83 dc 00 b0 07 d9 .9...9..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<c0131b20>] kmem_cache_alloc_trace+0x188/0x350
[<c0386720>] yaffs_internal_read_super.isra.18+0x1d0/0x7e4
[<c0386d58>] yaffs2_internal_read_super_mtd+0x24/0x34
[<c0147110>] mount_bdev+0x178/0x1a0
[<c03835c8>] yaffs2_mount+0x28/0x30
[<c0147a74>] mount_fs+0x54/0x194
[<c01620e0>] vfs_kern_mount+0x58/0xf0
[<c0164b18>] do_mount+0x210/0xa48
[<c01656a4>] SyS_mount+0x94/0xc8
[<c000ec80>] ret_fast_syscall+0x0/0x30
[<ffffffff>] 0xffffffff
Signed-off-by: czou <cao.zou@windriver.com>
|
|
A parallel of mainline 8d0207652cbe27d1f962050737848e5ad4671958
("->splice_write() via ->write_iter()") changes for the out of
tree yaffs2.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
A parallel of changes in mainline 8174202b34c30e0c07231bf63f18ab2
("write_iter variants of {__,}generic_file_aio_write()")
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
A parallel of the changes in mainline aad4f8bb42af06371aa0e85bf0cd9d
("switch simple generic_file_aio_read() users to ->read_iter()")
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
Upstream 5d826c847b34de6415b4f1becd88a57ff619af50 ("new helper:
readlink_copy()") deletes the vfs_readlink().
Use a portion of upstream yaffs2 4e188b08c5531f99f73383a85251e03a1e667b2
("Update to support Linux 3.14/3.15") from the yaffs2 repo at:
http://www.aleph1.co.uk/gitweb?p=yaffs2.git to replace it with
an updated call.
We don't take the whole commit, since it has a bunch of stuff
dependent on LINUX_VERSION_CODE that is not relevant to 3.17.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
|
fs/yaffs2/yaffs_vfs.c:3036:14: warning: 'yaffs_dump_dev_part0' defined but not used [-Wunused-function]
fs/yaffs2/yaffs_vfs.c:3074:14: warning: 'yaffs_dump_dev_part1' defined but not used [-Wunused-function]
fs/yaffs2/yaffs_vfs.c:3192:3: warning: 'mask_flags' defined but not used [-Wunused-variable]
Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
YAFFS doesn't sopport ACL yet, it must refuse any related settings.
Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Using these macros will make the build non-deterministic and
is explicitly forbidden in the kernel.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Without including major.h, yaffs2 fails to build with:
linux/fs/yaffs2/yaffs_mtdif.c:256:21: error: 'MTD_BLOCK_MAJOR' undeclared (first use in this function)
if (MAJOR(sdev) != MTD_BLOCK_MAJOR)
^
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Update yaffs2 to the latest from ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2,
to fix build issues with recent kernels.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Yaffs will select Yaffs1 for deives with 512 byte writing size.
Moreover, it will enable inband_tags automatically for devices with
small oob.
However, Yaffs1 can not work with inband_tags. So move the
oob size checking before auto selecting Yaffs1.
Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
|
|
The proc interfaces in the 3.10 kernel have changed in a manner that is not
compatible with yaffs2. As discussed in the following thread:
http://www.aleph1.co.uk/lurker/message/20130724.003329.c28842f5.en.html
The solution is to temporarily remove procfs support, which allows the FS to
continue to be used.
Based on this patch:
https://dev.openwrt.org/export/37617/trunk/target/linux/generic/patches-3.10/515-yaffs-3.10-disable-proc-entry.patch
We disable procfs for any kernel greater than 3.9
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Based on the openwrt patch:
https://dev.openwrt.org/export/37617/trunk/target/linux/generic/patches-3.10/512-yaffs-3.5-convert-to-use-kuid_t-kgid_t.patch
To fix compliation issues, we convert the latest yaffs2 to use kuid_t and
kgid_t for kernels greater than 3.9.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
empty message aborts the commit.
|
|
The initial integration of yaffs2 was via the single kernel version variant
of the code. That code has some fundamental issues, and isn't a suitable
base.
With this commit, we restore the multi kernel functionality and with it all
required include files.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Importing yaffs2 support from git://www.aleph1.co.uk/yaffs2 commit
ID 3a8580e503eed62cebb7b1b4fc3f3f4211010466.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|