aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/mntpt.c2
-rw-r--r--fs/ext3/super.c11
-rw-r--r--fs/ext4/super.c11
-rw-r--r--fs/locks.c2
-rw-r--r--fs/proc/inode.c3
-rw-r--r--fs/reiserfs/super.c13
-rw-r--r--fs/select.c2
7 files changed, 35 insertions, 9 deletions
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index a3684dcc76e7..6f8c96fb29eb 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -235,8 +235,8 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
235 err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts); 235 err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts);
236 switch (err) { 236 switch (err) {
237 case 0: 237 case 0:
238 mntput(nd->mnt);
239 dput(nd->dentry); 238 dput(nd->dentry);
239 mntput(nd->mnt);
240 nd->mnt = newmnt; 240 nd->mnt = newmnt;
241 nd->dentry = dget(newmnt->mnt_root); 241 nd->dentry = dget(newmnt->mnt_root);
242 schedule_delayed_work(&afs_mntpt_expiry_timer, 242 schedule_delayed_work(&afs_mntpt_expiry_timer,
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 22cfdd61c060..9537316a0714 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2578,8 +2578,11 @@ static int ext3_release_dquot(struct dquot *dquot)
2578 2578
2579 handle = ext3_journal_start(dquot_to_inode(dquot), 2579 handle = ext3_journal_start(dquot_to_inode(dquot),
2580 EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 2580 EXT3_QUOTA_DEL_BLOCKS(dquot->dq_sb));
2581 if (IS_ERR(handle)) 2581 if (IS_ERR(handle)) {
2582 /* Release dquot anyway to avoid endless cycle in dqput() */
2583 dquot_release(dquot);
2582 return PTR_ERR(handle); 2584 return PTR_ERR(handle);
2585 }
2583 ret = dquot_release(dquot); 2586 ret = dquot_release(dquot);
2584 err = ext3_journal_stop(handle); 2587 err = ext3_journal_stop(handle);
2585 if (!ret) 2588 if (!ret)
@@ -2712,6 +2715,12 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
2712 struct buffer_head *bh; 2715 struct buffer_head *bh;
2713 handle_t *handle = journal_current_handle(); 2716 handle_t *handle = journal_current_handle();
2714 2717
2718 if (!handle) {
2719 printk(KERN_WARNING "EXT3-fs: Quota write (off=%Lu, len=%Lu)"
2720 " cancelled because transaction is not started.\n",
2721 (unsigned long long)off, (unsigned long long)len);
2722 return -EIO;
2723 }
2715 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2724 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2716 while (towrite > 0) { 2725 while (towrite > 0) {
2717 tocopy = sb->s_blocksize - offset < towrite ? 2726 tocopy = sb->s_blocksize - offset < towrite ?
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4550b83ab1c9..3c1397fa83df 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2698,8 +2698,11 @@ static int ext4_release_dquot(struct dquot *dquot)
2698 2698
2699 handle = ext4_journal_start(dquot_to_inode(dquot), 2699 handle = ext4_journal_start(dquot_to_inode(dquot),
2700 EXT4_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 2700 EXT4_QUOTA_DEL_BLOCKS(dquot->dq_sb));
2701 if (IS_ERR(handle)) 2701 if (IS_ERR(handle)) {
2702 /* Release dquot anyway to avoid endless cycle in dqput() */
2703 dquot_release(dquot);
2702 return PTR_ERR(handle); 2704 return PTR_ERR(handle);
2705 }
2703 ret = dquot_release(dquot); 2706 ret = dquot_release(dquot);
2704 err = ext4_journal_stop(handle); 2707 err = ext4_journal_stop(handle);
2705 if (!ret) 2708 if (!ret)
@@ -2832,6 +2835,12 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
2832 struct buffer_head *bh; 2835 struct buffer_head *bh;
2833 handle_t *handle = journal_current_handle(); 2836 handle_t *handle = journal_current_handle();
2834 2837
2838 if (!handle) {
2839 printk(KERN_WARNING "EXT4-fs: Quota write (off=%Lu, len=%Lu)"
2840 " cancelled because transaction is not started.\n",
2841 (unsigned long long)off, (unsigned long long)len);
2842 return -EIO;
2843 }
2835 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2844 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2836 while (towrite > 0) { 2845 while (towrite > 0) {
2837 tocopy = sb->s_blocksize - offset < towrite ? 2846 tocopy = sb->s_blocksize - offset < towrite ?
diff --git a/fs/locks.c b/fs/locks.c
index 50857d2d3404..c795eaaf6c4c 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -782,7 +782,7 @@ find_conflict:
782 if (request->fl_flags & FL_ACCESS) 782 if (request->fl_flags & FL_ACCESS)
783 goto out; 783 goto out;
784 locks_copy_lock(new_fl, request); 784 locks_copy_lock(new_fl, request);
785 locks_insert_lock(&inode->i_flock, new_fl); 785 locks_insert_lock(before, new_fl);
786 new_fl = NULL; 786 new_fl = NULL;
787 error = 0; 787 error = 0;
788 788
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index a5b0dfd89a17..0e4d37c93eea 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -11,6 +11,7 @@
11#include <linux/string.h> 11#include <linux/string.h>
12#include <linux/stat.h> 12#include <linux/stat.h>
13#include <linux/completion.h> 13#include <linux/completion.h>
14#include <linux/poll.h>
14#include <linux/file.h> 15#include <linux/file.h>
15#include <linux/limits.h> 16#include <linux/limits.h>
16#include <linux/init.h> 17#include <linux/init.h>
@@ -232,7 +233,7 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t
232static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) 233static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts)
233{ 234{
234 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); 235 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode);
235 unsigned int rv = 0; 236 unsigned int rv = DEFAULT_POLLMASK;
236 unsigned int (*poll)(struct file *, struct poll_table_struct *); 237 unsigned int (*poll)(struct file *, struct poll_table_struct *);
237 238
238 spin_lock(&pde->pde_unload_lock); 239 spin_lock(&pde->pde_unload_lock);
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 5b68dd3f191a..a005451930b7 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1915,8 +1915,11 @@ static int reiserfs_release_dquot(struct dquot *dquot)
1915 ret = 1915 ret =
1916 journal_begin(&th, dquot->dq_sb, 1916 journal_begin(&th, dquot->dq_sb,
1917 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb)); 1917 REISERFS_QUOTA_DEL_BLOCKS(dquot->dq_sb));
1918 if (ret) 1918 if (ret) {
1919 /* Release dquot anyway to avoid endless cycle in dqput() */
1920 dquot_release(dquot);
1919 goto out; 1921 goto out;
1922 }
1920 ret = dquot_release(dquot); 1923 ret = dquot_release(dquot);
1921 err = 1924 err =
1922 journal_end(&th, dquot->dq_sb, 1925 journal_end(&th, dquot->dq_sb,
@@ -2067,6 +2070,12 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2067 size_t towrite = len; 2070 size_t towrite = len;
2068 struct buffer_head tmp_bh, *bh; 2071 struct buffer_head tmp_bh, *bh;
2069 2072
2073 if (!current->journal_info) {
2074 printk(KERN_WARNING "reiserfs: Quota write (off=%Lu, len=%Lu)"
2075 " cancelled because transaction is not started.\n",
2076 (unsigned long long)off, (unsigned long long)len);
2077 return -EIO;
2078 }
2070 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); 2079 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2071 while (towrite > 0) { 2080 while (towrite > 0) {
2072 tocopy = sb->s_blocksize - offset < towrite ? 2081 tocopy = sb->s_blocksize - offset < towrite ?
@@ -2098,7 +2107,7 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2098 data += tocopy; 2107 data += tocopy;
2099 blk++; 2108 blk++;
2100 } 2109 }
2101 out: 2110out:
2102 if (len == towrite) 2111 if (len == towrite)
2103 return err; 2112 return err;
2104 if (inode->i_size < off + len - towrite) 2113 if (inode->i_size < off + len - towrite)
diff --git a/fs/select.c b/fs/select.c
index a974082b0824..46dca31c607a 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -26,8 +26,6 @@
26 26
27#include <asm/uaccess.h> 27#include <asm/uaccess.h>
28 28
29#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
30
31struct poll_table_page { 29struct poll_table_page {
32 struct poll_table_page * next; 30 struct poll_table_page * next;
33 struct poll_table_entry * entry; 31 struct poll_table_entry * entry;