diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-08-27 17:55:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:10:26 -0400 |
commit | 2a117354b7bdfe13750a64307755e75436fb157a (patch) | |
tree | 708a038c0e381cf0c99be4a8237ce36fd25a53ba /fs/ocfs2 | |
parent | 7b540d0646ce122f0ba4520412be91e530719742 (diff) | |
download | linux-2a117354b7bdfe13750a64307755e75436fb157a.tar.bz2 |
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.c | 5 |
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, struct inode *inode = NULL; ssize_t ret = -EINVAL; int live_threshold; + int fput_needed; if (reg->hr_bdev) goto out; @@ -1766,7 +1767,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg, if (fd < 0 || fd >= INT_MAX) goto out; - filp = fget(fd); + filp = fget_light(fd, &fput_needed); if (filp == NULL) goto out; @@ -1884,7 +1885,7 @@ static ssize_t o2hb_region_dev_write(struct o2hb_region *reg, out: if (filp) - fput(filp); + fput_light(filp, fput_needed); if (inode) iput(inode); if (ret < 0) { |