History

Merge tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream

There are few important bug fixes for LogFS * tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream: Logfs: Allow NULL block_isbad() methods logfs: Grow inode in delete path logfs: Free areas before calling generic_shutdown_super() logfs: remove useless BUG_ON MAINTAINERS: Add Prasad Joshi in LogFS maintiners logfs: Propagate page parameter to __logfs_write_inode logfs: set superblock shutdown flag after generic sb shutdown logfs: take write mutex lock during fsync and sync logfs: Prevent memory corruption logfs: update page reference count for pined pages Fix up conflict in fs/logfs/dev_mtd.c due to semantic change in what "mtd->block_isbad" means in commit f2933e86ad93: "Logfs: Allow NULL block_isbad() methods" clashing with the abstraction changes in the commits 7086c19d0742: "mtd: introduce mtd_block_isbad interface" and d58b27ed58a3: "logfs: do not use 'mtd->block_isbad' directly". This resolution takes the semantics from commit f2933e86ad93, and just makes mtd_block_isbad() return zero (false) if the 'block_isbad' function is NULL. But that also means that now "mtd_can_have_bb()" always returns 0. Now, "mtd_block_markbad()" will obviously return an error if the low-level driver doesn't support bad blocks, so this is somewhat non-symmetric, but it actually makes sense if a NULL "block_isbad" function is considered to mean "I assume that all my blocks are always good".

Linus Torvalds committed 14 years ago

Commit d3712b92 parents c5d2bc1 f2933e811 files · +89 −37Browse files

Showing the changes to include/linux (1 of 11 files). Show all

Unified · Split

include/linux/mtd/mtd.h+2−2
@@ -441,7 +441,7 @@ static inline void mtd_resume(struct mtd_info *mtd) · 440 unmodified lines
441441 static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs)
442442 {
443443 if (!mtd->block_isbad)
444− return -EOPNOTSUPP;
444+ return 0;
445445 return mtd->block_isbad(mtd, ofs);
446446 }
447447
@@ -489,7 +489,7 @@ static inline int mtd_has_oob(const struct mtd_info *mtd) · 41 unmodified lines
489489
490490 static inline int mtd_can_have_bb(const struct mtd_info *mtd)
491491 {
492− return !!mtd->block_isbad;
492+ return 0;
493493 }
494494
495495 /* Kernel-side ioctl definitions */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t