inode.c (6e1db88d536adcbbfe562b2d4b7d6425784fff12) inode.c (155130a4f7848b1aac439cab6bda1a175507c71c)
1/*
2 * linux/fs/minix/inode.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * Copyright (C) 1996 Gertjan van Wingerde
7 * Minix V2 fs support.
8 *

--- 352 unchanged lines hidden (view full) ---

361{
362 return __block_write_begin(page, pos, len, minix_get_block);
363}
364
365static int minix_write_begin(struct file *file, struct address_space *mapping,
366 loff_t pos, unsigned len, unsigned flags,
367 struct page **pagep, void **fsdata)
368{
1/*
2 * linux/fs/minix/inode.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * Copyright (C) 1996 Gertjan van Wingerde
7 * Minix V2 fs support.
8 *

--- 352 unchanged lines hidden (view full) ---

361{
362 return __block_write_begin(page, pos, len, minix_get_block);
363}
364
365static int minix_write_begin(struct file *file, struct address_space *mapping,
366 loff_t pos, unsigned len, unsigned flags,
367 struct page **pagep, void **fsdata)
368{
369 *pagep = NULL;
370 return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
369 int ret;
370
371 ret = block_write_begin(mapping, pos, len, flags, pagep,
371 minix_get_block);
372 minix_get_block);
373 if (unlikely(ret)) {
374 loff_t isize = mapping->host->i_size;
375 if (pos + len > isize)
376 vmtruncate(mapping->host, isize);
377 }
378
379 return ret;
372}
373
374static sector_t minix_bmap(struct address_space *mapping, sector_t block)
375{
376 return generic_block_bmap(mapping,block,minix_get_block);
377}
378
379static const struct address_space_operations minix_aops = {

--- 264 unchanged lines hidden ---
380}
381
382static sector_t minix_bmap(struct address_space *mapping, sector_t block)
383{
384 return generic_block_bmap(mapping,block,minix_get_block);
385}
386
387static const struct address_space_operations minix_aops = {

--- 264 unchanged lines hidden ---