提交 482e0007 编写于 作者: J Jeff Layton

fs: remove leftover comments from mandatory locking removal

Stragglers from commit f7e33bdb ("fs: remove mandatory file locking
support").
Signed-off-by: NJeff Layton <jlayton@kernel.org>
上级 e9728cc7
...@@ -3074,9 +3074,7 @@ static int handle_truncate(struct user_namespace *mnt_userns, struct file *filp) ...@@ -3074,9 +3074,7 @@ static int handle_truncate(struct user_namespace *mnt_userns, struct file *filp)
int error = get_write_access(inode); int error = get_write_access(inode);
if (error) if (error)
return error; return error;
/*
* Refuse to truncate files with mandatory locks held on them.
*/
error = security_path_truncate(path); error = security_path_truncate(path);
if (!error) { if (!error) {
error = do_truncate(mnt_userns, path->dentry, 0, error = do_truncate(mnt_userns, path->dentry, 0,
......
...@@ -368,10 +368,6 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t ...@@ -368,10 +368,6 @@ int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t
if (unlikely((ssize_t) count < 0)) if (unlikely((ssize_t) count < 0))
return -EINVAL; return -EINVAL;
/*
* ranged mandatory locking does not apply to streams - it makes sense
* only for files where position has a meaning.
*/
if (ppos) { if (ppos) {
loff_t pos = *ppos; loff_t pos = *ppos;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册