3 .old..........pc/vfs_nointent_2.6.0-suse/fs/namei.c
4 .new.........fs/namei.c
5 Index: linux-2.6.3-20/fs/namei.c
6 ===================================================================
7 --- linux-2.6.3-20.orig/fs/namei.c 2004-03-08 14:32:24.000000000 -0800
8 +++ linux-2.6.3-20/fs/namei.c 2004-03-08 14:40:01.000000000 -0800
13 - error = do_truncate(dentry, 0);
14 + error = do_truncate(dentry, 0, 1);
16 put_write_access(inode);
20 struct dentry * dentry;
22 + intent_init(&nd.intent, IT_LOOKUP);
26 @@ -1536,6 +1537,15 @@
27 error = path_lookup(tmp, LOOKUP_PARENT, &nd);
31 + if (nd.dentry->d_inode->i_op->mknod_raw) {
32 + struct inode_operations *op = nd.dentry->d_inode->i_op;
33 + error = op->mknod_raw(&nd, mode, dev);
34 + /* the file system wants to use normal vfs path now */
35 + if (error != -EOPNOTSUPP)
39 dentry = lookup_create(&nd, 0);
40 error = PTR_ERR(dentry);
45 up(&nd.dentry->d_inode->i_sem);
50 @@ -1603,10 +1614,18 @@
52 struct dentry *dentry;
54 + intent_init(&nd.intent, IT_LOOKUP);
56 error = path_lookup(tmp, LOOKUP_PARENT, &nd);
59 + if (nd.dentry->d_inode->i_op->mkdir_raw) {
60 + struct inode_operations *op = nd.dentry->d_inode->i_op;
61 + error = op->mkdir_raw(&nd, mode);
62 + /* the file system wants to use normal vfs path now */
63 + if (error != -EOPNOTSUPP)
66 dentry = lookup_create(&nd, 1);
67 error = PTR_ERR(dentry);
68 if (!IS_ERR(dentry)) {
72 up(&nd.dentry->d_inode->i_sem);
79 struct dentry *dentry;
81 + intent_init(&nd.intent, IT_LOOKUP);
83 name = getname(pathname);
85 @@ -1716,6 +1737,16 @@
90 + if (nd.dentry->d_inode->i_op->rmdir_raw) {
91 + struct inode_operations *op = nd.dentry->d_inode->i_op;
93 + error = op->rmdir_raw(&nd);
94 + /* the file system wants to use normal vfs path now */
95 + if (error != -EOPNOTSUPP)
99 down(&nd.dentry->d_inode->i_sem);
100 dentry = lookup_hash(&nd.last, nd.dentry);
101 error = PTR_ERR(dentry);
102 @@ -1774,6 +1805,7 @@
103 struct dentry *dentry;
105 struct inode *inode = NULL;
106 + intent_init(&nd.intent, IT_LOOKUP);
108 name = getname(pathname);
110 @@ -1785,6 +1817,13 @@
112 if (nd.last_type != LAST_NORM)
114 + if (nd.dentry->d_inode->i_op->unlink_raw) {
115 + struct inode_operations *op = nd.dentry->d_inode->i_op;
116 + error = op->unlink_raw(&nd);
117 + /* the file system wants to use normal vfs path now */
118 + if (error != -EOPNOTSUPP)
121 down(&nd.dentry->d_inode->i_sem);
122 dentry = lookup_hash(&nd.last, nd.dentry);
123 error = PTR_ERR(dentry);
124 @@ -1852,10 +1891,18 @@
126 struct dentry *dentry;
128 + intent_init(&nd.intent, IT_LOOKUP);
130 error = path_lookup(to, LOOKUP_PARENT, &nd);
133 + if (nd.dentry->d_inode->i_op->symlink_raw) {
134 + struct inode_operations *op = nd.dentry->d_inode->i_op;
135 + error = op->symlink_raw(&nd, from);
136 + /* the file system wants to use normal vfs path now */
137 + if (error != -EOPNOTSUPP)
140 dentry = lookup_create(&nd, 0);
141 error = PTR_ERR(dentry);
142 if (!IS_ERR(dentry)) {
143 @@ -1863,6 +1910,7 @@
146 up(&nd.dentry->d_inode->i_sem);
151 @@ -1926,6 +1974,8 @@
152 struct nameidata nd, old_nd;
155 + intent_init(&nd.intent, IT_LOOKUP);
156 + intent_init(&old_nd.intent, IT_LOOKUP);
158 to = getname(newname);
160 @@ -1940,6 +1990,13 @@
162 if (old_nd.mnt != nd.mnt)
164 + if (nd.dentry->d_inode->i_op->link_raw) {
165 + struct inode_operations *op = nd.dentry->d_inode->i_op;
166 + error = op->link_raw(&old_nd, &nd);
167 + /* the file system wants to use normal vfs path now */
168 + if (error != -EOPNOTSUPP)
171 new_dentry = lookup_create(&nd, 0);
172 error = PTR_ERR(new_dentry);
173 if (!IS_ERR(new_dentry)) {
174 @@ -1990,7 +2047,7 @@
177 int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
178 - struct inode *new_dir, struct dentry *new_dentry)
179 + struct inode *new_dir, struct dentry *new_dentry)
182 struct inode *target;
183 @@ -2035,7 +2092,7 @@
186 int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
187 - struct inode *new_dir, struct dentry *new_dentry)
188 + struct inode *new_dir, struct dentry *new_dentry)
190 struct inode *target;
192 @@ -2112,6 +2169,8 @@
193 struct dentry * old_dentry, *new_dentry;
194 struct dentry * trap;
195 struct nameidata oldnd, newnd;
196 + intent_init(&oldnd.intent, IT_LOOKUP);
197 + intent_init(&newnd.intent, IT_LOOKUP);
199 error = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
201 @@ -2134,6 +2193,13 @@
202 if (newnd.last_type != LAST_NORM)
205 + if (old_dir->d_inode->i_op->rename_raw) {
206 + error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
207 + /* the file system wants to use normal vfs path now */
208 + if (error != -EOPNOTSUPP)
212 trap = lock_rename(new_dir, old_dir);
214 old_dentry = lookup_hash(&oldnd.last, old_dir);
215 @@ -2165,8 +2231,7 @@
216 if (new_dentry == trap)
219 - error = vfs_rename(old_dir->d_inode, old_dentry,
220 - new_dir->d_inode, new_dentry);
221 + error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
225 .old..........pc/vfs_nointent_2.6.0-suse/fs/open.c
226 .new.........fs/open.c
227 Index: linux-2.6.3-20/fs/open.c
228 ===================================================================
229 --- linux-2.6.3-20.orig/fs/open.c 2004-03-08 14:23:40.000000000 -0800
230 +++ linux-2.6.3-20/fs/open.c 2004-03-08 14:40:01.000000000 -0800
235 -int do_truncate(struct dentry *dentry, loff_t length)
236 +int do_truncate(struct dentry *dentry, loff_t length, int called_from_open)
239 + struct inode_operations *op = dentry->d_inode->i_op;
240 struct iattr newattrs;
242 /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
244 newattrs.ia_size = length;
245 newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
246 down(&dentry->d_inode->i_sem);
247 - err = notify_change(dentry, &newattrs);
248 + if (called_from_open)
249 + newattrs.ia_valid |= ATTR_FROM_OPEN;
250 + if (op->setattr_raw) {
251 + newattrs.ia_valid |= ATTR_RAW;
252 + newattrs.ia_ctime = CURRENT_TIME;
253 + err = op->setattr_raw(dentry->d_inode, &newattrs);
255 + err = notify_change(dentry, &newattrs);
256 up(&dentry->d_inode->i_sem);
260 error = locks_verify_truncate(inode, NULL, length);
263 - error = do_truncate(nd.dentry, length);
264 + error = do_truncate(nd.dentry, length, 0);
266 put_write_access(inode);
270 error = locks_verify_truncate(inode, file, length);
272 - error = do_truncate(dentry, length);
273 + error = do_truncate(dentry, length, 0);
278 (error = permission(inode,MAY_WRITE,&nd)) != 0)
281 - down(&inode->i_sem);
282 - error = notify_change(nd.dentry, &newattrs);
284 + if (inode->i_op->setattr_raw) {
285 + struct inode_operations *op = nd.dentry->d_inode->i_op;
287 + newattrs.ia_valid |= ATTR_RAW;
288 + error = op->setattr_raw(inode, &newattrs);
289 + /* the file system wants to use normal vfs path now */
290 + if (error != -EOPNOTSUPP)
293 + down(&inode->i_sem);
294 + error = notify_change(nd.dentry, &newattrs);
301 (error = permission(inode,MAY_WRITE,&nd)) != 0)
304 - down(&inode->i_sem);
305 - error = notify_change(nd.dentry, &newattrs);
307 + if (inode->i_op->setattr_raw) {
308 + struct inode_operations *op = nd.dentry->d_inode->i_op;
310 + newattrs.ia_valid |= ATTR_RAW;
311 + error = op->setattr_raw(inode, &newattrs);
312 + /* the file system wants to use normal vfs path now */
313 + if (error != -EOPNOTSUPP)
316 + down(&inode->i_sem);
317 + error = notify_change(nd.dentry, &newattrs);
324 if (IS_RDONLY(inode))
327 + if (inode->i_op->setattr_raw) {
328 + struct inode_operations *op = nd.dentry->d_inode->i_op;
330 + newattrs.ia_mode = mode;
331 + newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
332 + newattrs.ia_valid |= ATTR_RAW;
333 + error = op->setattr_raw(inode, &newattrs);
334 + /* the file system wants to use normal vfs path now */
335 + if (error != -EOPNOTSUPP)
340 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
343 if (IS_RDONLY(inode))
346 + if (inode->i_op->setattr_raw) {
347 + struct inode_operations *op = dentry->d_inode->i_op;
349 + newattrs.ia_uid = user;
350 + newattrs.ia_gid = group;
351 + newattrs.ia_valid = ATTR_UID | ATTR_GID;
352 + newattrs.ia_valid |= ATTR_RAW;
353 + error = op->setattr_raw(inode, &newattrs);
354 + /* the file system wants to use normal vfs path now */
355 + if (error != -EOPNOTSUPP)
358 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
360 newattrs.ia_valid = ATTR_CTIME;
363 if (!S_ISDIR(inode->i_mode))
364 newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
367 error = notify_change(dentry, &newattrs);
369 .old..........pc/vfs_nointent_2.6.0-suse/fs/exec.c
370 .new.........fs/exec.c
371 Index: linux-2.6.3-20/fs/exec.c
372 ===================================================================
373 --- linux-2.6.3-20.orig/fs/exec.c 2004-03-08 14:23:40.000000000 -0800
374 +++ linux-2.6.3-20/fs/exec.c 2004-03-08 14:40:01.000000000 -0800
375 @@ -1406,7 +1406,7 @@
377 if (!file->f_op->write)
379 - if (do_truncate(file->f_dentry, 0) != 0)
380 + if (do_truncate(file->f_dentry, 0, 0) != 0)
383 retval = binfmt->core_dump(signr, regs, file);
384 .old..........pc/vfs_nointent_2.6.0-suse/include/linux/fs.h
385 .new.........include/linux/fs.h
386 Index: linux-2.6.3-20/include/linux/fs.h
387 ===================================================================
388 --- linux-2.6.3-20.orig/include/linux/fs.h 2004-03-08 14:23:41.000000000 -0800
389 +++ linux-2.6.3-20/include/linux/fs.h 2004-03-08 14:42:10.000000000 -0800
390 @@ -838,13 +838,20 @@
391 int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
392 struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
393 int (*link) (struct dentry *,struct inode *,struct dentry *);
394 + int (*link_raw) (struct nameidata *,struct nameidata *);
395 int (*unlink) (struct inode *,struct dentry *);
396 + int (*unlink_raw) (struct nameidata *);
397 int (*symlink) (struct inode *,struct dentry *,const char *);
398 + int (*symlink_raw) (struct nameidata *,const char *);
399 int (*mkdir) (struct inode *,struct dentry *,int);
400 + int (*mkdir_raw) (struct nameidata *,int);
401 int (*rmdir) (struct inode *,struct dentry *);
402 + int (*rmdir_raw) (struct nameidata *);
403 int (*mknod) (struct inode *,struct dentry *,int,dev_t);
404 + int (*mknod_raw) (struct nameidata *,int,dev_t);
405 int (*rename) (struct inode *, struct dentry *,
406 struct inode *, struct dentry *);
407 + int (*rename_raw) (struct nameidata *, struct nameidata *);
408 int (*readlink) (struct dentry *, char __user *,int);
409 int (*follow_link) (struct dentry *, struct nameidata *);
410 void (*truncate) (struct inode *);
411 @@ -1130,7 +1137,7 @@
415 -extern int do_truncate(struct dentry *, loff_t start);
416 +extern int do_truncate(struct dentry *, loff_t start, int called_from_open);
417 extern struct file *filp_open(const char *, int, int);
418 extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
419 extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
420 .old..........pc/vfs_nointent_2.6.0-suse/net/unix/af_unix.c
421 .new.........net/unix/af_unix.c
422 Index: linux-2.6.3-20/net/unix/af_unix.c
423 ===================================================================
424 --- linux-2.6.3-20.orig/net/unix/af_unix.c 2004-03-05 02:07:04.000000000 -0800
425 +++ linux-2.6.3-20/net/unix/af_unix.c 2004-03-08 14:40:01.000000000 -0800
429 if (sunname->sun_path[0]) {
430 + intent_init(&nd.intent, IT_LOOKUP);
431 err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd);