Blame view
fs/minix/file.c
1.1 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 3 4 5 6 7 |
/* * linux/fs/minix/file.c * * Copyright (C) 1991, 1992 Linus Torvalds * * minix regular file handling primitives */ |
1da177e4c Linux-2.6.12-rc2 |
8 9 10 11 12 13 |
#include "minix.h" /* * We have mostly NULLs here: the current defaults are OK for * the minix filesystem. */ |
4b6f5d20b [PATCH] Make most... |
14 |
const struct file_operations minix_file_operations = { |
1da177e4c Linux-2.6.12-rc2 |
15 |
.llseek = generic_file_llseek, |
aad4f8bb4 switch simple gen... |
16 |
.read_iter = generic_file_read_iter, |
8174202b3 write_iter varian... |
17 |
.write_iter = generic_file_write_iter, |
1da177e4c Linux-2.6.12-rc2 |
18 |
.mmap = generic_file_mmap, |
1b061d924 rename the generi... |
19 |
.fsync = generic_file_fsync, |
5ffc4ef45 sendfile: remove ... |
20 |
.splice_read = generic_file_splice_read, |
1da177e4c Linux-2.6.12-rc2 |
21 |
}; |
d39aae9ec add missing setat... |
22 23 |
static int minix_setattr(struct dentry *dentry, struct iattr *attr) { |
2b0143b5c VFS: normal files... |
24 |
struct inode *inode = d_inode(dentry); |
d39aae9ec add missing setat... |
25 |
int error; |
31051c85b fs: Give dentry t... |
26 |
error = setattr_prepare(dentry, attr); |
d39aae9ec add missing setat... |
27 28 |
if (error) return error; |
1025774ce remove inode_setattr |
29 30 31 |
if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size != i_size_read(inode)) { |
7fc7cd00f minix: drop vmtru... |
32 |
error = inode_newsize_ok(inode, attr->ia_size); |
1025774ce remove inode_setattr |
33 34 |
if (error) return error; |
7fc7cd00f minix: drop vmtru... |
35 36 37 |
truncate_setsize(inode, attr->ia_size); minix_truncate(inode); |
1025774ce remove inode_setattr |
38 39 40 41 42 |
} setattr_copy(inode, attr); mark_inode_dirty(inode); return 0; |
d39aae9ec add missing setat... |
43 |
} |
92e1d5be9 [PATCH] mark stru... |
44 |
const struct inode_operations minix_file_inode_operations = { |
d39aae9ec add missing setat... |
45 |
.setattr = minix_setattr, |
1da177e4c Linux-2.6.12-rc2 |
46 47 |
.getattr = minix_getattr, }; |