diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:58:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 20:58:44 -0400 |
commit | 426e1f5cec4821945642230218876b0e89aafab1 (patch) | |
tree | 2728ace018d0698886989da586210ef1543a7098 /fs/libfs.c | |
parent | 9e5fca251f44832cb996961048ea977f80faf6ea (diff) | |
parent | 63997e98a3be68d7cec806d22bf9b02b2e1daabb (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
split invalidate_inodes()
fs: skip I_FREEING inodes in writeback_sb_inodes
fs: fold invalidate_list into invalidate_inodes
fs: do not drop inode_lock in dispose_list
fs: inode split IO and LRU lists
fs: switch bdev inode bdi's correctly
fs: fix buffer invalidation in invalidate_list
fsnotify: use dget_parent
smbfs: use dget_parent
exportfs: use dget_parent
fs: use RCU read side protection in d_validate
fs: clean up dentry lru modification
fs: split __shrink_dcache_sb
fs: improve DCACHE_REFERENCED usage
fs: use percpu counter for nr_dentry and nr_dentry_unused
fs: simplify __d_free
fs: take dcache_lock inside __d_path
fs: do not assign default i_ino in new_inode
fs: introduce a per-cpu last_ino allocator
new helper: ihold()
...
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 62baa0387d6e..304a5132ca27 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -255,7 +255,7 @@ int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *den | |||
255 | 255 | ||
256 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; | 256 | inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; |
257 | inc_nlink(inode); | 257 | inc_nlink(inode); |
258 | atomic_inc(&inode->i_count); | 258 | ihold(inode); |
259 | dget(dentry); | 259 | dget(dentry); |
260 | d_instantiate(dentry, inode); | 260 | d_instantiate(dentry, inode); |
261 | return 0; | 261 | return 0; |
@@ -892,10 +892,6 @@ EXPORT_SYMBOL_GPL(generic_fh_to_parent); | |||
892 | */ | 892 | */ |
893 | int generic_file_fsync(struct file *file, int datasync) | 893 | int generic_file_fsync(struct file *file, int datasync) |
894 | { | 894 | { |
895 | struct writeback_control wbc = { | ||
896 | .sync_mode = WB_SYNC_ALL, | ||
897 | .nr_to_write = 0, /* metadata-only; caller takes care of data */ | ||
898 | }; | ||
899 | struct inode *inode = file->f_mapping->host; | 895 | struct inode *inode = file->f_mapping->host; |
900 | int err; | 896 | int err; |
901 | int ret; | 897 | int ret; |
@@ -906,7 +902,7 @@ int generic_file_fsync(struct file *file, int datasync) | |||
906 | if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) | 902 | if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) |
907 | return ret; | 903 | return ret; |
908 | 904 | ||
909 | err = sync_inode(inode, &wbc); | 905 | err = sync_inode_metadata(inode, 1); |
910 | if (ret == 0) | 906 | if (ret == 0) |
911 | ret = err; | 907 | ret = err; |
912 | return ret; | 908 | return ret; |