diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-10-31 15:35:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-31 16:35:15 +0300 |
commit | 51ee4b84f5c86935b438d6636f34b523edb415a8 (patch) | |
tree | c60e0da8f8b6393477d79ef6d6ce321ee3b8ecaa /fs/gfs2 | |
parent | 96f935934591b72f5b05fd6923bc8cdcae92f2e5 (diff) | |
download | linux-51ee4b84f5c86935b438d6636f34b523edb415a8.tar.xz |
locks: let the caller free file_lock on ->setlease failure
The caller allocated it, the caller should free it.
The only issue so far is that we could change the flp pointer even on an
error return if the fl_change callback failed. But we can simply move
the flp assignment after the fl_change invocation, as the callers don't
care about the flp return value if the setlease call failed.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/file.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index ac943c1307b5..aa996471ec5c 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -629,8 +629,6 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov, static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl) { - if (arg != F_UNLCK) - locks_free_lock(*fl); return -EINVAL; } |