Commit 694a3577 authored by Vincent Zvikaramba's avatar Vincent Zvikaramba

Revert "kernel: Update sdfat filesystem"

This reverts commit 6b390e82.
parent 6b390e82
......@@ -253,15 +253,9 @@ void sdfat_time_unix2fat(struct sdfat_sb_info *sbi, struct timespec *ts,
TIMESTAMP_T *tm_now(struct sdfat_sb_info *sbi, TIMESTAMP_T *tp)
{
struct timespec ts;
struct timespec ts = CURRENT_TIME_SEC;
DATE_TIME_T dt;
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,8,0)
ts = CURRENT_TIME_SEC;
#else
ktime_get_real_ts(&ts);
#endif
sdfat_time_unix2fat(sbi, &ts, &dt);
tp->year = dt.Year;
......@@ -384,3 +378,4 @@ void __sdfat_dmsg(int level, const char *fmt, ...)
#endif
}
#endif
......@@ -94,11 +94,7 @@ static inline void __sdfat_submit_bio_write2(int flags, struct bio *bio)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
static void mpage_write_end_io(struct bio *bio)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
__mpage_write_end_io(bio, bio->bi_status);
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */
__mpage_write_end_io(bio, bio->bi_error);
#endif
}
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */
static void mpage_write_end_io(struct bio *bio, int err)
......@@ -281,11 +277,7 @@ mpage_alloc(struct block_device *bdev,
}
if (bio) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
bio_set_dev(bio, bdev);
#else
bio->bi_bdev = bdev;
#endif
__sdfat_set_bio_sector(bio, first_sector);
}
return bio;
......@@ -369,11 +361,7 @@ static int sdfat_mpage_writepage(struct page *page,
if (buffer_new(bh)) {
clear_buffer_new(bh);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
clean_bdev_bh_alias(bh);
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) */
unmap_underlying_metadata(bh->b_bdev, bh->b_blocknr);
#endif
}
}
......@@ -423,12 +411,8 @@ static int sdfat_mpage_writepage(struct page *page,
goto confused;
if (buffer_new(&map_bh))
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
clean_bdev_bh_alias(&map_bh);
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) */
unmap_underlying_metadata(map_bh.b_bdev,
map_bh.b_blocknr);
#endif
if (buffer_boundary(&map_bh)) {
boundary_block = map_bh.b_blocknr;
boundary_bdev = map_bh.b_bdev;
......@@ -620,3 +604,4 @@ int sdfat_mpage_writepages(struct address_space *mapping,
}
#endif /* CONFIG_SDFAT_ALIGNED_MPAGE_WRITE */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment