[FS#579] Rename failure when file both in rom and overlay in mvebu / wrt3200acm, due to kernel 4.9 or ubi?
LEDE Bugs
lede-bugs at lists.infradead.org
Thu Mar 2 01:25:13 PST 2017
The following task has a new comment added:
FS#579 - Rename failure when file both in rom and overlay in mvebu / wrt3200acm, due to kernel 4.9 or ubi?
User who did this - Hannu Nyman (hnyman)
----------
I think that I have identified the culprit commit causing the rename bug for ubifs with overlayfs, but I am not sure about the fix. Deleting the offending two lines?
I compared the respective files in 4.4 and 4.9. I took the files that the kernel 4.4 patches 052-... handled, meaning fs/ubifs/ubifs.h, journal.c and dir.c.
* 4.4 patched journal.c equals 4.9 journal.c
* 4.4 patched ubifs.h has only trivial differences to 4.9
* dir.c has otherwise only trivial changes (e.g. mutex lock changes), but there is one significant change in 4.9, where "return -EINVAL" has been inserted.
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/fs/ubifs/dir.c?h=linux-4.9.y#n1091
struct timespec time;
unsigned int uninitialized_var(saved_nlink);
if (flags & ~RENAME_NOREPLACE)
return -EINVAL;
/*
The change is here:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/fs/ubifs/dir.c?h=linux-4.9.y&id=f03b8ad8d38634d13e802165cc15917481b47835
Full commit:
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.9.y&id=f03b8ad8d38634d13e802165cc15917481b47835
fs: support RENAME_NOREPLACE for local filesystems
This is trivial to do:
- add flags argument to foo_rename()
- check if flags doesn't have any other than RENAME_NOREPLACE
- assign foo_rename() to .rename2 instead of .rename
Filesystems converted:
affs, bfs, exofs, ext2, hfs, hfsplus, jffs2, jfs, logfs, minix, msdos,
nilfs2, omfs, reiserfs, sysvfs, ubifs, udf, ufs, vfat.
(overlayfs is not mentioned in the list.)
----------
More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=579#comment2037
More information about the lede-bugs
mailing list