aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-27 17:55:17 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:26 -0400
commit2a117354b7bdfe13750a64307755e75436fb157a (patch)
tree708a038c0e381cf0c99be4a8237ce36fd25a53ba /fs/ocfs2
parent7b540d0646ce122f0ba4520412be91e530719742 (diff)
switch o2hb_region_dev_write() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/cluster/heartbeat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index a4e855e3690e..61c28ae266f5 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1750,6 +1750,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg,
1750 struct inode *inode = NULL; 1750 struct inode *inode = NULL;
1751 ssize_t ret = -EINVAL; 1751 ssize_t ret = -EINVAL;
1752 int live_threshold; 1752 int live_threshold;
1753 int fput_needed;
1753 1754
1754 if (reg->hr_bdev) 1755 if (reg->hr_bdev)
1755 goto out; 1756 goto out;
@@ -1766,7 +1767,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg,
1766 if (fd < 0 || fd >= INT_MAX) 1767 if (fd < 0 || fd >= INT_MAX)
1767 goto out; 1768 goto out;
1768 1769
1769 filp = fget(fd); 1770 filp = fget_light(fd, &fput_needed);
1770 if (filp == NULL) 1771 if (filp == NULL)
1771 goto out; 1772 goto out;
1772 1773
@@ -1884,7 +1885,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg,
1884 1885
1885out: 1886out:
1886 if (filp) 1887 if (filp)
1887 fput(filp); 1888 fput_light(filp, fput_needed);
1888 if (inode) 1889 if (inode)
1889 iput(inode); 1890 iput(inode);
1890 if (ret < 0) { 1891 if (ret < 0) {