diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-07 11:28:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:29:47 -0400 |
commit | 5f380c7fa7e01f15ca0816bd241ece9a64a73192 (patch) | |
tree | 2136f54098eb85d21d17ee43f73724a5befd70a1 /fs/udf | |
parent | 0b8def9d6dfa6b2a9a2740cf81d8d2c134688d39 (diff) | |
download | linux-rpi-5f380c7fa7e01f15ca0816bd241ece9a64a73192.tar.gz linux-rpi-5f380c7fa7e01f15ca0816bd241ece9a64a73192.tar.bz2 linux-rpi-5f380c7fa7e01f15ca0816bd241ece9a64a73192.zip |
lift generic_write_checks() into callers of __generic_file_write_iter()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/file.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 78d42548b260..35e81ed99405 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c @@ -151,7 +151,17 @@ static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *from) } else up_write(&iinfo->i_data_sem); + retval = generic_write_checks(file, &iocb->ki_pos, &count, 0); + if (retval) + goto out; + + if (count == 0) + goto out; + + iov_iter_truncate(from, count); + retval = __generic_file_write_iter(iocb, from); +out: mutex_unlock(&inode->i_mutex); if (retval > 0) { |