file.c (4ba24fef3eb3b142197135223b90ced2f319cd53) file.c (5955102c9984fa081b2d570cfac75c97eecf8f3b)
1/*
2 * Copyright (C) 2012 Red Hat, Inc.
3 * Copyright (C) 2012 Jeremy Kerr <jeremy.kerr@canonical.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */

--- 36 unchanged lines hidden (view full) ---

45 goto out;
46 }
47
48 if (bytes == -ENOENT) {
49 drop_nlink(inode);
50 d_delete(file->f_path.dentry);
51 dput(file->f_path.dentry);
52 } else {
1/*
2 * Copyright (C) 2012 Red Hat, Inc.
3 * Copyright (C) 2012 Jeremy Kerr <jeremy.kerr@canonical.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */

--- 36 unchanged lines hidden (view full) ---

45 goto out;
46 }
47
48 if (bytes == -ENOENT) {
49 drop_nlink(inode);
50 d_delete(file->f_path.dentry);
51 dput(file->f_path.dentry);
52 } else {
53 mutex_lock(&inode->i_mutex);
53 inode_lock(inode);
54 i_size_write(inode, datasize + sizeof(attributes));
54 i_size_write(inode, datasize + sizeof(attributes));
55 mutex_unlock(&inode->i_mutex);
55 inode_unlock(inode);
56 }
57
58 bytes = count;
59
60out:
61 kfree(data);
62
63 return bytes;

--- 48 unchanged lines hidden ---
56 }
57
58 bytes = count;
59
60out:
61 kfree(data);
62
63 return bytes;

--- 48 unchanged lines hidden ---