vfs.c (17deb9c2db01c7813611291d251d8c7dbdfd3c9d) | vfs.c (97e47fa11deae10ae72aa1109e700565c57152f5) |
---|---|
1/* 2 * File operations used by nfsd. Some of these have been ripped from 3 * other parts of the kernel because they weren't exported, others 4 * are partial duplicates with added or changed functionality. 5 * 6 * Note that several functions dget() the dentry upon which they want 7 * to act, most notably those that create directory entries. Response 8 * dentry's are dput()'d if necessary in the release callback. --- 1303 unchanged lines hidden (view full) --- 1312 if (err) 1313 goto out; 1314 } else { 1315 /* called from nfsd_proc_create */ 1316 dchild = dget(resfhp->fh_dentry); 1317 if (!fhp->fh_locked) { 1318 /* not actually possible */ 1319 printk(KERN_ERR | 1/* 2 * File operations used by nfsd. Some of these have been ripped from 3 * other parts of the kernel because they weren't exported, others 4 * are partial duplicates with added or changed functionality. 5 * 6 * Note that several functions dget() the dentry upon which they want 7 * to act, most notably those that create directory entries. Response 8 * dentry's are dput()'d if necessary in the release callback. --- 1303 unchanged lines hidden (view full) --- 1312 if (err) 1313 goto out; 1314 } else { 1315 /* called from nfsd_proc_create */ 1316 dchild = dget(resfhp->fh_dentry); 1317 if (!fhp->fh_locked) { 1318 /* not actually possible */ 1319 printk(KERN_ERR |
1320 "nfsd_create: parent %s/%s not locked!\n", 1321 dentry->d_parent->d_name.name, 1322 dentry->d_name.name); | 1320 "nfsd_create: parent %pd2 not locked!\n", 1321 dentry); |
1323 err = nfserr_io; 1324 goto out; 1325 } 1326 } 1327 /* 1328 * Make sure the child dentry is still negative ... 1329 */ 1330 err = nfserr_exist; 1331 if (dchild->d_inode) { | 1322 err = nfserr_io; 1323 goto out; 1324 } 1325 } 1326 /* 1327 * Make sure the child dentry is still negative ... 1328 */ 1329 err = nfserr_exist; 1330 if (dchild->d_inode) { |
1332 dprintk("nfsd_create: dentry %s/%s not negative!\n", 1333 dentry->d_name.name, dchild->d_name.name); | 1331 dprintk("nfsd_create: dentry %pd/%pd not negative!\n", 1332 dentry, dchild); |
1334 goto out; 1335 } 1336 1337 if (!(iap->ia_valid & ATTR_MODE)) 1338 iap->ia_mode = 0; 1339 iap->ia_mode = (iap->ia_mode & S_IALLUGO) | type; 1340 1341 err = nfserr_inval; --- 1007 unchanged lines hidden --- | 1333 goto out; 1334 } 1335 1336 if (!(iap->ia_valid & ATTR_MODE)) 1337 iap->ia_mode = 0; 1338 iap->ia_mode = (iap->ia_mode & S_IALLUGO) | type; 1339 1340 err = nfserr_inval; --- 1007 unchanged lines hidden --- |