aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 20:51:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 20:51:54 -0400
commit20b4fb485227404329e41ad15588afad3df23050 (patch)
treef3e099f0ab3da8a93b447203e294d2bb22f6dc05 /include/linux/fs.h
parentb9394d8a657cd3c064fa432aa0905c1b58b38fe9 (diff)
parentac3e3c5b1164397656df81b9e9ab4991184d3236 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro, Misc cleanups all over the place, mainly wrt /proc interfaces (switch create_proc_entry to proc_create(), get rid of the deprecated create_proc_read_entry() in favor of using proc_create_data() and seq_file etc). 7kloc removed. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits) don't bother with deferred freeing of fdtables proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h proc: Make the PROC_I() and PDE() macros internal to procfs proc: Supply a function to remove a proc entry by PDE take cgroup_open() and cpuset_open() to fs/proc/base.c ppc: Clean up scanlog ppc: Clean up rtas_flash driver somewhat hostap: proc: Use remove_proc_subtree() drm: proc: Use remove_proc_subtree() drm: proc: Use minor->index to label things, not PDE->name drm: Constify drm_proc_list[] zoran: Don't print proc_dir_entry data in debug reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() proc: Supply an accessor for getting the data from a PDE's parent airo: Use remove_proc_subtree() rtl8192u: Don't need to save device proc dir PDE rtl8187se: Use a dir under /proc/net/r8180/ proc: Add proc_mkdir_data() proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h} proc: Move PDE_NET() to fs/proc/proc_net.c ...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 17d8b1596215..e8cd6b839675 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2082,7 +2082,6 @@ extern int sync_filesystem(struct super_block *);
2082extern const struct file_operations def_blk_fops; 2082extern const struct file_operations def_blk_fops;
2083extern const struct file_operations def_chr_fops; 2083extern const struct file_operations def_chr_fops;
2084extern const struct file_operations bad_sock_fops; 2084extern const struct file_operations bad_sock_fops;
2085extern const struct file_operations def_fifo_fops;
2086#ifdef CONFIG_BLOCK 2085#ifdef CONFIG_BLOCK
2087extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); 2086extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
2088extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long); 2087extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);
@@ -2154,10 +2153,6 @@ extern void init_special_inode(struct inode *, umode_t, dev_t);
2154extern void make_bad_inode(struct inode *); 2153extern void make_bad_inode(struct inode *);
2155extern int is_bad_inode(struct inode *); 2154extern int is_bad_inode(struct inode *);
2156 2155
2157extern const struct file_operations read_pipefifo_fops;
2158extern const struct file_operations write_pipefifo_fops;
2159extern const struct file_operations rdwr_pipefifo_fops;
2160
2161#ifdef CONFIG_BLOCK 2156#ifdef CONFIG_BLOCK
2162/* 2157/*
2163 * return READ, READA, or WRITE 2158 * return READ, READA, or WRITE
@@ -2225,6 +2220,20 @@ static inline struct inode *file_inode(struct file *f)
2225 return f->f_inode; 2220 return f->f_inode;
2226} 2221}
2227 2222
2223static inline void file_start_write(struct file *file)
2224{
2225 if (!S_ISREG(file_inode(file)->i_mode))
2226 return;
2227 __sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, true);
2228}
2229
2230static inline void file_end_write(struct file *file)
2231{
2232 if (!S_ISREG(file_inode(file)->i_mode))
2233 return;
2234 __sb_end_write(file_inode(file)->i_sb, SB_FREEZE_WRITE);
2235}
2236
2228/* 2237/*
2229 * get_write_access() gets write permission for a file. 2238 * get_write_access() gets write permission for a file.
2230 * put_write_access() releases this write permission. 2239 * put_write_access() releases this write permission.